Commit ca53735a4cd6cc8159e1a9515446e81230dc5b27

Authored by Masahiro Yamada
Committed by Tom Rini
1 parent 365475e6d1

Move CONFIG_DISPLAY_CPUINFO to Makefile

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>

Showing 4 changed files with 6 additions and 6 deletions Side-by-side Diff

arch/arm/cpu/arm926ejs/omap/Makefile
... ... @@ -5,6 +5,7 @@
5 5 # SPDX-License-Identifier: GPL-2.0+
6 6 #
7 7  
8   -obj-y = timer.o cpuinfo.o
  8 +obj-y = timer.o
  9 +obj-$(CONFIG_DISPLAY_CPUINFO) += cpuinfo.o
9 10 obj-y += reset.o
arch/arm/cpu/arm926ejs/omap/cpuinfo.c
... ... @@ -13,7 +13,7 @@
13 13 #include <command.h>
14 14 #include <linux/compiler.h>
15 15  
16   -#if defined(CONFIG_DISPLAY_CPUINFO) && defined(CONFIG_OMAP)
  16 +#if defined(CONFIG_OMAP)
17 17  
18 18 #define omap_readw(x) *(volatile unsigned short *)(x)
19 19 #define omap_readl(x) *(volatile unsigned long *)(x)
... ... @@ -239,5 +239,5 @@
239 239 return 0;
240 240 }
241 241  
242   -#endif /* #if defined(CONFIG_DISPLAY_CPUINFO) && defined(CONFIG_OMAP) */
  242 +#endif /* #if defined(CONFIG_OMAP) */
arch/arm/cpu/tegra-common/Makefile
... ... @@ -8,5 +8,6 @@
8 8 #
9 9  
10 10 obj-y += lowlevel_init.o
11   -obj-y += ap.o board.o sys_info.o clock.o cache.o
  11 +obj-y += ap.o board.o clock.o cache.o
  12 +obj-$(CONFIG_DISPLAY_CPUINFO) += sys_info.o
arch/arm/cpu/tegra-common/sys_info.c
... ... @@ -8,7 +8,6 @@
8 8 #include <common.h>
9 9 #include <linux/ctype.h>
10 10  
11   -#ifdef CONFIG_DISPLAY_CPUINFO
12 11 void upstring(char *s)
13 12 {
14 13 while (*s) {
... ... @@ -30,5 +29,4 @@
30 29 /* TBD: Add printf of major/minor rev info, stepping, etc. */
31 30 return 0;
32 31 }
33   -#endif /* CONFIG_DISPLAY_CPUINFO */