aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-10-08 13:40:17 -0400
committerPaul Walmsley <paul@pwsan.com>2010-10-08 13:40:17 -0400
commit6515e48932c8bf04227f9dd638c8ac634f89ba24 (patch)
tree43fb1ac8c4cd051d98fb48e522db1c82d7ef475a /arch/arm/mach-omap2
parent6f911492ed901dcafc9c5c7f507087bb94218ba7 (diff)
OMAP2+: Kconfig: disallow builds for boards that don't use the currently-selected SoC
Currently, if, for example, CONFIG_ARCH_OMAP2420 is not selected, OMAP2420 board files can still be included in the build. This results in link errors: arch/arm/mach-omap2/built-in.o: In function `omap_generic_map_io': .../arch/arm/mach-omap2/board-generic.c:51: undefined reference to `omap2_set_globals_242x' arch/arm/mach-omap2/built-in.o: In function `omap_h4_init': .../arch/arm/mach-omap2/board-h4.c:330: undefined reference to `omap2420_mux_init' arch/arm/mach-omap2/built-in.o: In function `omap_h4_map_io': .../arch/arm/mach-omap2/board-h4.c:373: undefined reference to `omap2_set_globals_242x' arch/arm/mach-omap2/built-in.o: In function `omap_apollon_init': .../arch/arm/mach-omap2/board-apollon.c:325: undefined reference to `omap2420_mux_init' arch/arm/mach-omap2/built-in.o: In function `omap_apollon_map_io': .../arch/arm/mach-omap2/board-apollon.c:353: undefined reference to `omap2_set_globals_242x' make: *** [.tmp_vmlinux1] Error 1 Fix this by making the boards depend on the Kconfig option for the specific SoC that they use. Also, while here, fix the mach-omap2/board-generic.c file to remove the dependency on OMAP2420. Charulatha Varadarajan <charu@ti.com> caught a typo - thanks Charu. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Charulatha Varadarajan <charu@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/Kconfig6
-rw-r--r--arch/arm/mach-omap2/board-generic.c16
2 files changed, 17 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 2b79b84d0542..ab784bfde908 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -100,20 +100,20 @@ config MACH_OMAP2_TUSB6010
100 100
101config MACH_OMAP_H4 101config MACH_OMAP_H4
102 bool "OMAP 2420 H4 board" 102 bool "OMAP 2420 H4 board"
103 depends on ARCH_OMAP2 103 depends on ARCH_OMAP2420
104 default y 104 default y
105 select OMAP_PACKAGE_ZAF 105 select OMAP_PACKAGE_ZAF
106 select OMAP_DEBUG_DEVICES 106 select OMAP_DEBUG_DEVICES
107 107
108config MACH_OMAP_APOLLON 108config MACH_OMAP_APOLLON
109 bool "OMAP 2420 Apollon board" 109 bool "OMAP 2420 Apollon board"
110 depends on ARCH_OMAP2 110 depends on ARCH_OMAP2420
111 default y 111 default y
112 select OMAP_PACKAGE_ZAC 112 select OMAP_PACKAGE_ZAC
113 113
114config MACH_OMAP_2430SDP 114config MACH_OMAP_2430SDP
115 bool "OMAP 2430 SDP board" 115 bool "OMAP 2430 SDP board"
116 depends on ARCH_OMAP2 116 depends on ARCH_OMAP2430
117 default y 117 default y
118 select OMAP_PACKAGE_ZAC 118 select OMAP_PACKAGE_ZAC
119 119
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 3482b99e8c86..8aee862b625a 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -48,10 +48,22 @@ static void __init omap_generic_init(void)
48 48
49static void __init omap_generic_map_io(void) 49static void __init omap_generic_map_io(void)
50{ 50{
51 omap2_set_globals_242x(); /* should be 242x, 243x, or 343x */ 51 if (cpu_is_omap242x()) {
52 omap242x_map_common_io(); 52 omap2_set_globals_242x();
53 omap242x_map_common_io();
54 } else if (cpu_is_omap243x()) {
55 omap2_set_globals_243x();
56 omap243x_map_common_io();
57 } else if (cpu_is_omap34xx()) {
58 omap2_set_globals_3xxx();
59 omap34xx_map_common_io();
60 } else if (cpu_is_omap44xx()) {
61 omap2_set_globals_443x();
62 omap44xx_map_common_io();
63 }
53} 64}
54 65
66/* XXX This machine entry name should be updated */
55MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx") 67MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
56 /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */ 68 /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
57 .phys_io = 0x48000000, 69 .phys_io = 0x48000000,