#
obj-y += board.o
+ifndef CONFIG_ARCH_ZYNQ
+obj-$(CONFIG_DISPLAY_CPUINFO) += cpu-info.o
+endif
ifndef CONFIG_SPL_BUILD
obj-$(CONFIG_CMD_FRU) += fru.o fru_ops.o
endif
return -1;
}
-#if defined(CONFIG_DISPLAY_CPUINFO) && !defined(CONFIG_ARCH_ZYNQ)
-int print_cpuinfo(void)
-{
- struct udevice *soc;
- char name[SOC_MAX_STR_SIZE];
- int ret;
-
- ret = soc_get(&soc);
- if (ret) {
- printf("CPU: UNKNOWN\n");
- return 0;
- }
-
- ret = soc_get_family(soc, name, SOC_MAX_STR_SIZE);
- if (ret)
- printf("CPU: %s\n", name);
-
- ret = soc_get_revision(soc, name, SOC_MAX_STR_SIZE);
- if (ret)
- printf("Silicon: %s\n", name);
-
- ret = soc_get_machine(soc, name, SOC_MAX_STR_SIZE);
- if (ret)
- printf("Chip: %s\n", name);
-
- return 0;
-}
-#endif
-
#if CONFIG_IS_ENABLED(DTB_RESELECT)
#define MAX_NAME_LENGTH 50
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * (C) Copyright 2014 - 2020 Xilinx, Inc.
+ * Michal Simek <michal.simek@xilinx.com>
+ */
+
+#include <common.h>
+#include <soc.h>
+
+int print_cpuinfo(void)
+{
+ struct udevice *soc;
+ char name[SOC_MAX_STR_SIZE];
+ int ret;
+
+ ret = soc_get(&soc);
+ if (ret) {
+ printf("CPU: UNKNOWN\n");
+ return 0;
+ }
+
+ ret = soc_get_family(soc, name, SOC_MAX_STR_SIZE);
+ if (ret)
+ printf("CPU: %s\n", name);
+
+ ret = soc_get_revision(soc, name, SOC_MAX_STR_SIZE);
+ if (ret)
+ printf("Silicon: %s\n", name);
+
+ ret = soc_get_machine(soc, name, SOC_MAX_STR_SIZE);
+ if (ret)
+ printf("Chip: %s\n", name);
+
+ return 0;
+}