aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVaibhav Hiremath <hvaibhav@ti.com>2012-07-05 11:05:15 -0400
committerTony Lindgren <tony@atomide.com>2012-07-05 11:05:15 -0400
commitecc46cfdad7499a21296f0757059c4965f1fbc98 (patch)
treec040dbcf69fc66b809893bfd4963fb72904be757
parent971b8a9c3eeb798f6201299728fdbb04ebb681c6 (diff)
ARM: OMAP2+: Remove unnecessary ifdef around __omap2_set_globals
The function __omap2_set_globals() can be common across all platforms/architectures, even in case of omap4, internally it calls same set of functions as in __omap2_set_globals() function (except for sdrc). This patch adds new config flag SOC_HAS_OMAP2_SDRC to handle sdrc, so that we can reuse same function across omap2/3/4... Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Cc: Kevin Hilman <khilman@ti.com> Cc: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/Kconfig8
-rw-r--r--arch/arm/mach-omap2/Makefile3
-rw-r--r--arch/arm/mach-omap2/common.c8
-rw-r--r--arch/arm/mach-omap2/common.h5
4 files changed, 16 insertions, 8 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 3649a34db00d..6c934778357b 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -21,12 +21,16 @@ config ARCH_OMAP2PLUS_TYPICAL
21 help 21 help
22 Compile a kernel suitable for booting most boards 22 Compile a kernel suitable for booting most boards
23 23
24config SOC_HAS_OMAP2_SDRC
25 bool "OMAP2 SDRAM Controller support"
26
24config ARCH_OMAP2 27config ARCH_OMAP2
25 bool "TI OMAP2" 28 bool "TI OMAP2"
26 depends on ARCH_OMAP2PLUS 29 depends on ARCH_OMAP2PLUS
27 default y 30 default y
28 select CPU_V6 31 select CPU_V6
29 select MULTI_IRQ_HANDLER 32 select MULTI_IRQ_HANDLER
33 select SOC_HAS_OMAP2_SDRC
30 34
31config ARCH_OMAP3 35config ARCH_OMAP3
32 bool "TI OMAP3" 36 bool "TI OMAP3"
@@ -38,6 +42,7 @@ config ARCH_OMAP3
38 select PM_OPP if PM 42 select PM_OPP if PM
39 select ARM_CPU_SUSPEND if PM 43 select ARM_CPU_SUSPEND if PM
40 select MULTI_IRQ_HANDLER 44 select MULTI_IRQ_HANDLER
45 select SOC_HAS_OMAP2_SDRC
41 46
42config ARCH_OMAP4 47config ARCH_OMAP4
43 bool "TI OMAP4" 48 bool "TI OMAP4"
@@ -64,16 +69,19 @@ config SOC_OMAP2420
64 depends on ARCH_OMAP2 69 depends on ARCH_OMAP2
65 default y 70 default y
66 select OMAP_DM_TIMER 71 select OMAP_DM_TIMER
72 select SOC_HAS_OMAP2_SDRC
67 73
68config SOC_OMAP2430 74config SOC_OMAP2430
69 bool "OMAP2430 support" 75 bool "OMAP2430 support"
70 depends on ARCH_OMAP2 76 depends on ARCH_OMAP2
71 default y 77 default y
78 select SOC_HAS_OMAP2_SDRC
72 79
73config SOC_OMAP3430 80config SOC_OMAP3430
74 bool "OMAP3430 support" 81 bool "OMAP3430 support"
75 depends on ARCH_OMAP3 82 depends on ARCH_OMAP3
76 default y 83 default y
84 select SOC_HAS_OMAP2_SDRC
77 85
78config SOC_TI81XX 86config SOC_TI81XX
79 bool "TI81XX support" 87 bool "TI81XX support"
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 846d44547fd3..240f1969f2ad 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -6,7 +6,7 @@
6obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \ 6obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \
7 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o 7 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o
8 8
9omap-2-3-common = irq.o sdrc.o 9omap-2-3-common = irq.o
10hwmod-common = omap_hwmod.o \ 10hwmod-common = omap_hwmod.o \
11 omap_hwmod_common_data.o 11 omap_hwmod_common_data.o
12clock-common = clock.o clock_common_data.o \ 12clock-common = clock.o clock_common_data.o \
@@ -23,6 +23,7 @@ obj-y += mcbsp.o
23endif 23endif
24 24
25obj-$(CONFIG_TWL4030_CORE) += omap_twl.o 25obj-$(CONFIG_TWL4030_CORE) += omap_twl.o
26obj-$(CONFIG_SOC_HAS_OMAP2_SDRC) += sdrc.o
26 27
27# SMP support ONLY available for OMAP4 28# SMP support ONLY available for OMAP4
28 29
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index a7aa538e681d..73d2a0b9ca04 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -29,8 +29,6 @@
29 29
30/* Global address base setup code */ 30/* Global address base setup code */
31 31
32#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
33
34static void __init __omap2_set_globals(struct omap_globals *omap2_globals) 32static void __init __omap2_set_globals(struct omap_globals *omap2_globals)
35{ 33{
36 omap2_set_globals_tap(omap2_globals); 34 omap2_set_globals_tap(omap2_globals);
@@ -39,8 +37,6 @@ static void __init __omap2_set_globals(struct omap_globals *omap2_globals)
39 omap2_set_globals_prcm(omap2_globals); 37 omap2_set_globals_prcm(omap2_globals);
40} 38}
41 39
42#endif
43
44#if defined(CONFIG_SOC_OMAP2420) 40#if defined(CONFIG_SOC_OMAP2420)
45 41
46static struct omap_globals omap242x_globals = { 42static struct omap_globals omap242x_globals = {
@@ -173,9 +169,7 @@ static struct omap_globals omap4_globals = {
173 169
174void __init omap2_set_globals_443x(void) 170void __init omap2_set_globals_443x(void)
175{ 171{
176 omap2_set_globals_tap(&omap4_globals); 172 __omap2_set_globals(&omap4_globals);
177 omap2_set_globals_control(&omap4_globals);
178 omap2_set_globals_prcm(&omap4_globals);
179} 173}
180 174
181void __init omap4_map_io(void) 175void __init omap4_map_io(void)
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 5d99c1b2cb48..404f172d95a8 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -174,7 +174,12 @@ void omap2_set_globals_am33xx(void);
174 174
175/* These get called from omap2_set_globals_xxxx(), do not call these */ 175/* These get called from omap2_set_globals_xxxx(), do not call these */
176void omap2_set_globals_tap(struct omap_globals *); 176void omap2_set_globals_tap(struct omap_globals *);
177#if defined(CONFIG_SOC_HAS_OMAP2_SDRC)
177void omap2_set_globals_sdrc(struct omap_globals *); 178void omap2_set_globals_sdrc(struct omap_globals *);
179#else
180static inline void omap2_set_globals_sdrc(struct omap_globals *omap2_globals)
181{ }
182#endif
178void omap2_set_globals_control(struct omap_globals *); 183void omap2_set_globals_control(struct omap_globals *);
179void omap2_set_globals_prcm(struct omap_globals *); 184void omap2_set_globals_prcm(struct omap_globals *);
180 185