aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-04-30 18:02:26 -0400
committerArnd Bergmann <arnd@arndb.de>2013-07-05 17:07:40 -0400
commit59d92875a6d9f056233fafd6abd41f86eba931ef (patch)
treee833379d3e21553b0a3e1b03fd820d793c6f68fb /arch
parent514a590847ff42dc00ba6c6165736128ad7730a8 (diff)
ARM: OMAP: build mach-omap code only if needed
If we build a kernel with CONFIG_ARCH_OMAP2PLUS enabled but all of the individual SoCs disabled, we run into a large number of link errors because if incorrect dependencies: arch/arm/mach-omap2/built-in.o: In function `_add_initiator_dep': arch/arm/mach-omap2/omap_hwmod.c:691: undefined reference to `clkdm_add_sleepdep' arch/arm/mach-omap2/built-in.o: In function `_del_initiator_dep': arch/arm/mach-omap2/omap_hwmod.c:720: undefined reference to `clkdm_del_sleepdep' arch/arm/mach-omap2/built-in.o: In function `_enable': arch/arm/mach-omap2/omap_hwmod.c:2145: undefined reference to `clkdm_in_hwsup' arch/arm/mach-omap2/omap_hwmod.c:2147: undefined reference to `clkdm_hwmod_enable' arch/arm/mach-omap2/omap_hwmod.c:2191: undefined reference to `clkdm_hwmod_disable' arch/arm/mach-omap2/omap_hwmod.c:2146: undefined reference to `clkdm_missing_idle_reporting' arch/arm/mach-omap2/built-in.o: In function `_idle': arch/arm/mach-omap2/omap_hwmod.c:2235: undefined reference to `clkdm_hwmod_disable' arch/arm/mach-omap2/built-in.o: In function `_shutdown': arch/arm/mach-omap2/omap_hwmod.c:2338: undefined reference to `clkdm_hwmod_disable' arch/arm/mach-omap2/built-in.o: In function `omap_hwmod_get_context_loss_count': arch/arm/mach-omap2/omap_hwmod.c:4071: undefined reference to `pwrdm_get_context_loss_count' arch/arm/mach-omap2/built-in.o: In function `omap_pm_clkdms_setup': arch/arm/mach-omap2/pm.c:114: undefined reference to `clkdm_allow_idle' arch/arm/mach-omap2/pm.c:117: undefined reference to `clkdm_sleep' arch/arm/mach-omap2/built-in.o: In function `omap2_common_pm_late_init': arch/arm/mach-omap2/pm.c:294: undefined reference to `omap_voltage_late_init' arch/arm/mach-omap2/built-in.o: In function `omap2_gpio_dev_init': arch/arm/mach-omap2/gpio.c:133: undefined reference to `pwrdm_can_ever_lose_context' We can avoid this if we make CONFIG_ARCH_OMAP2PLUS a silent option that gets enabled any time that one of the SoC versions is enabled. Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/configs/omap2plus_defconfig4
-rw-r--r--arch/arm/mach-omap2/Kconfig148
2 files changed, 78 insertions, 74 deletions
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 2ac0ffb12f03..f9b7fccd795d 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -22,6 +22,10 @@ CONFIG_MODULE_SRCVERSION_ALL=y
22# CONFIG_BLK_DEV_BSG is not set 22# CONFIG_BLK_DEV_BSG is not set
23CONFIG_ARCH_MULTI_V6=y 23CONFIG_ARCH_MULTI_V6=y
24CONFIG_ARCH_OMAP2PLUS=y 24CONFIG_ARCH_OMAP2PLUS=y
25CONFIG_ARCH_OMAP2=y
26CONFIG_ARCH_OMAP3=y
27CONFIG_ARCH_OMAP4=y
28CONFIG_SOC_AM33XX=y
25CONFIG_OMAP_RESET_CLOCKS=y 29CONFIG_OMAP_RESET_CLOCKS=y
26CONFIG_OMAP_MUX_DEBUG=y 30CONFIG_OMAP_MUX_DEBUG=y
27CONFIG_ARCH_VEXPRESS_CA9X4=y 31CONFIG_ARCH_VEXPRESS_CA9X4=y
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 1f8127afa744..5c1405157bb6 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -1,62 +1,10 @@
1config ARCH_OMAP 1config ARCH_OMAP
2 bool 2 bool
3 3
4config ARCH_OMAP2PLUS
5 bool "TI OMAP2/3/4/5 SoCs with device tree support" if (ARCH_MULTI_V6 || ARCH_MULTI_V7)
6 select ARCH_HAS_CPUFREQ
7 select ARCH_HAS_HOLES_MEMORYMODEL
8 select ARCH_OMAP
9 select ARCH_REQUIRE_GPIOLIB
10 select CLKDEV_LOOKUP
11 select CLKSRC_MMIO
12 select GENERIC_CLOCKEVENTS
13 select GENERIC_IRQ_CHIP
14 select HAVE_CLK
15 select OMAP_DM_TIMER
16 select PINCTRL
17 select PROC_DEVICETREE if PROC_FS
18 select SOC_BUS
19 select SPARSE_IRQ
20 select TI_PRIV_EDMA
21 select USE_OF
22 help
23 Systems based on OMAP2, OMAP3, OMAP4 or OMAP5
24
25
26if ARCH_OMAP2PLUS
27
28menu "TI OMAP2/3/4 Specific Features"
29
30config ARCH_OMAP2PLUS_TYPICAL
31 bool "Typical OMAP configuration"
32 default y
33 select AEABI
34 select HIGHMEM
35 select I2C
36 select I2C_OMAP
37 select MENELAUS if ARCH_OMAP2
38 select NEON if ARCH_OMAP3 || ARCH_OMAP4 || SOC_OMAP5
39 select PM_RUNTIME
40 select REGULATOR
41 select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4
42 select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4
43 select VFP
44 help
45 Compile a kernel suitable for booting most boards
46
47config SOC_HAS_OMAP2_SDRC
48 bool "OMAP2 SDRAM Controller support"
49
50config SOC_HAS_REALTIME_COUNTER
51 bool "Real time free running counter"
52 depends on SOC_OMAP5
53 default y
54
55config ARCH_OMAP2 4config ARCH_OMAP2
56 bool "TI OMAP2" 5 bool "TI OMAP2"
57 depends on ARCH_OMAP2PLUS
58 depends on ARCH_MULTI_V6 6 depends on ARCH_MULTI_V6
59 default y 7 select ARCH_OMAP2PLUS
60 select CPU_V6 8 select CPU_V6
61 select MULTI_IRQ_HANDLER 9 select MULTI_IRQ_HANDLER
62 select SOC_HAS_OMAP2_SDRC 10 select SOC_HAS_OMAP2_SDRC
@@ -64,9 +12,8 @@ config ARCH_OMAP2
64 12
65config ARCH_OMAP3 13config ARCH_OMAP3
66 bool "TI OMAP3" 14 bool "TI OMAP3"
67 depends on ARCH_OMAP2PLUS
68 depends on ARCH_MULTI_V7 15 depends on ARCH_MULTI_V7
69 default y 16 select ARCH_OMAP2PLUS
70 select ARCH_HAS_OPP 17 select ARCH_HAS_OPP
71 select ARM_CPU_SUSPEND if PM 18 select ARM_CPU_SUSPEND if PM
72 select CPU_V7 19 select CPU_V7
@@ -80,9 +27,8 @@ config ARCH_OMAP3
80 27
81config ARCH_OMAP4 28config ARCH_OMAP4
82 bool "TI OMAP4" 29 bool "TI OMAP4"
83 default y
84 depends on ARCH_OMAP2PLUS
85 depends on ARCH_MULTI_V7 30 depends on ARCH_MULTI_V7
31 select ARCH_OMAP2PLUS
86 select ARCH_HAS_OPP 32 select ARCH_HAS_OPP
87 select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP 33 select ARCH_NEEDS_CPU_IDLE_COUPLED if SMP
88 select ARM_CPU_SUSPEND if PM 34 select ARM_CPU_SUSPEND if PM
@@ -107,6 +53,7 @@ config ARCH_OMAP4
107config SOC_OMAP5 53config SOC_OMAP5
108 bool "TI OMAP5" 54 bool "TI OMAP5"
109 depends on ARCH_MULTI_V7 55 depends on ARCH_MULTI_V7
56 select ARCH_OMAP2PLUS
110 select ARM_CPU_SUSPEND if PM 57 select ARM_CPU_SUSPEND if PM
111 select ARM_GIC 58 select ARM_GIC
112 select CPU_V7 59 select CPU_V7
@@ -116,6 +63,76 @@ config SOC_OMAP5
116 select COMMON_CLK 63 select COMMON_CLK
117 select HAVE_ARM_ARCH_TIMER 64 select HAVE_ARM_ARCH_TIMER
118 65
66config SOC_AM33XX
67 bool "AM33XX support"
68 depends on ARCH_MULTI_V7
69 select ARCH_OMAP2PLUS
70 select ARM_CPU_SUSPEND if PM
71 select CPU_V7
72 select MULTI_IRQ_HANDLER
73 select COMMON_CLK
74
75config SOC_AM43XX
76 bool "TI AM43x"
77 depends on ARCH_MULTI_V7
78 select CPU_V7
79 select ARCH_OMAP2PLUS
80 select MULTI_IRQ_HANDLER
81 select ARM_GIC
82 select COMMON_CLK
83 select MACH_OMAP_GENERIC
84
85config ARCH_OMAP2PLUS
86 bool
87 select ARCH_HAS_BANDGAP
88 select ARCH_HAS_CPUFREQ
89 select ARCH_HAS_HOLES_MEMORYMODEL
90 select ARCH_OMAP
91 select ARCH_REQUIRE_GPIOLIB
92 select CLKDEV_LOOKUP
93 select CLKSRC_MMIO
94 select GENERIC_CLOCKEVENTS
95 select GENERIC_IRQ_CHIP
96 select HAVE_CLK
97 select OMAP_DM_TIMER
98 select PINCTRL
99 select PROC_DEVICETREE if PROC_FS
100 select SOC_BUS
101 select SPARSE_IRQ
102 select USE_OF
103 help
104 Systems based on OMAP2, OMAP3, OMAP4 or OMAP5
105
106
107if ARCH_OMAP2PLUS
108
109menu "TI OMAP2/3/4 Specific Features"
110
111config ARCH_OMAP2PLUS_TYPICAL
112 bool "Typical OMAP configuration"
113 default y
114 select AEABI
115 select HIGHMEM
116 select I2C
117 select I2C_OMAP
118 select MENELAUS if ARCH_OMAP2
119 select NEON if ARCH_OMAP3 || ARCH_OMAP4 || SOC_OMAP5
120 select PM_RUNTIME
121 select REGULATOR
122 select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4
123 select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4
124 select VFP
125 help
126 Compile a kernel suitable for booting most boards
127
128config SOC_HAS_OMAP2_SDRC
129 bool "OMAP2 SDRAM Controller support"
130
131config SOC_HAS_REALTIME_COUNTER
132 bool "Real time free running counter"
133 depends on SOC_OMAP5
134 default y
135
119comment "OMAP Core Type" 136comment "OMAP Core Type"
120 depends on ARCH_OMAP2 137 depends on ARCH_OMAP2
121 138
@@ -143,23 +160,6 @@ config SOC_TI81XX
143 depends on ARCH_OMAP3 160 depends on ARCH_OMAP3
144 default y 161 default y
145 162
146config SOC_AM33XX
147 bool "AM33XX support"
148 depends on ARCH_MULTI_V7
149 default y
150 select ARM_CPU_SUSPEND if PM
151 select CPU_V7
152 select MULTI_IRQ_HANDLER
153 select COMMON_CLK
154
155config SOC_AM43XX
156 bool "TI AM43x"
157 select CPU_V7
158 select MULTI_IRQ_HANDLER
159 select ARM_GIC
160 select COMMON_CLK
161 select MACH_OMAP_GENERIC
162
163config OMAP_PACKAGE_ZAF 163config OMAP_PACKAGE_ZAF
164 bool 164 bool
165 165