If the whole code is surrounded by #ifdef(CONFIG_ ) .. #endif,
it should be moved to Makefile.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
# SPDX-License-Identifier: GPL-2.0+
#
-obj-y = timer.o cpuinfo.o
+obj-y = timer.o
+obj-$(CONFIG_DISPLAY_CPUINFO) += cpuinfo.o
obj-y += reset.o
#include <command.h>
#include <linux/compiler.h>
-#if defined(CONFIG_DISPLAY_CPUINFO) && defined(CONFIG_OMAP)
+#if defined(CONFIG_OMAP)
#define omap_readw(x) *(volatile unsigned short *)(x)
#define omap_readl(x) *(volatile unsigned long *)(x)
return 0;
}
-#endif /* #if defined(CONFIG_DISPLAY_CPUINFO) && defined(CONFIG_OMAP) */
+#endif /* #if defined(CONFIG_OMAP) */
#
obj-y += lowlevel_init.o
-obj-y += ap.o board.o sys_info.o clock.o cache.o
+obj-y += ap.o board.o clock.o cache.o
+obj-$(CONFIG_DISPLAY_CPUINFO) += sys_info.o
#include <common.h>
#include <linux/ctype.h>
-#ifdef CONFIG_DISPLAY_CPUINFO
void upstring(char *s)
{
while (*s) {
/* TBD: Add printf of major/minor rev info, stepping, etc. */
return 0;
}
-#endif /* CONFIG_DISPLAY_CPUINFO */