Commit ecc46cfd authored by Vaibhav Hiremath's avatar Vaibhav Hiremath Committed by Tony Lindgren

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: default avatarVaibhav Hiremath <hvaibhav@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 971b8a9c
...@@ -21,12 +21,16 @@ config ARCH_OMAP2PLUS_TYPICAL ...@@ -21,12 +21,16 @@ config ARCH_OMAP2PLUS_TYPICAL
help help
Compile a kernel suitable for booting most boards Compile a kernel suitable for booting most boards
config SOC_HAS_OMAP2_SDRC
bool "OMAP2 SDRAM Controller support"
config ARCH_OMAP2 config ARCH_OMAP2
bool "TI OMAP2" bool "TI OMAP2"
depends on ARCH_OMAP2PLUS depends on ARCH_OMAP2PLUS
default y default y
select CPU_V6 select CPU_V6
select MULTI_IRQ_HANDLER select MULTI_IRQ_HANDLER
select SOC_HAS_OMAP2_SDRC
config ARCH_OMAP3 config ARCH_OMAP3
bool "TI OMAP3" bool "TI OMAP3"
...@@ -38,6 +42,7 @@ config ARCH_OMAP3 ...@@ -38,6 +42,7 @@ config ARCH_OMAP3
select PM_OPP if PM select PM_OPP if PM
select ARM_CPU_SUSPEND if PM select ARM_CPU_SUSPEND if PM
select MULTI_IRQ_HANDLER select MULTI_IRQ_HANDLER
select SOC_HAS_OMAP2_SDRC
config ARCH_OMAP4 config ARCH_OMAP4
bool "TI OMAP4" bool "TI OMAP4"
...@@ -64,16 +69,19 @@ config SOC_OMAP2420 ...@@ -64,16 +69,19 @@ config SOC_OMAP2420
depends on ARCH_OMAP2 depends on ARCH_OMAP2
default y default y
select OMAP_DM_TIMER select OMAP_DM_TIMER
select SOC_HAS_OMAP2_SDRC
config SOC_OMAP2430 config SOC_OMAP2430
bool "OMAP2430 support" bool "OMAP2430 support"
depends on ARCH_OMAP2 depends on ARCH_OMAP2
default y default y
select SOC_HAS_OMAP2_SDRC
config SOC_OMAP3430 config SOC_OMAP3430
bool "OMAP3430 support" bool "OMAP3430 support"
depends on ARCH_OMAP3 depends on ARCH_OMAP3
default y default y
select SOC_HAS_OMAP2_SDRC
config SOC_TI81XX config SOC_TI81XX
bool "TI81XX support" bool "TI81XX support"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \ obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \
common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o
omap-2-3-common = irq.o sdrc.o omap-2-3-common = irq.o
hwmod-common = omap_hwmod.o \ hwmod-common = omap_hwmod.o \
omap_hwmod_common_data.o omap_hwmod_common_data.o
clock-common = clock.o clock_common_data.o \ clock-common = clock.o clock_common_data.o \
...@@ -23,6 +23,7 @@ obj-y += mcbsp.o ...@@ -23,6 +23,7 @@ obj-y += mcbsp.o
endif endif
obj-$(CONFIG_TWL4030_CORE) += omap_twl.o obj-$(CONFIG_TWL4030_CORE) += omap_twl.o
obj-$(CONFIG_SOC_HAS_OMAP2_SDRC) += sdrc.o
# SMP support ONLY available for OMAP4 # SMP support ONLY available for OMAP4
......
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
/* Global address base setup code */ /* Global address base setup code */
#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
static void __init __omap2_set_globals(struct omap_globals *omap2_globals) static void __init __omap2_set_globals(struct omap_globals *omap2_globals)
{ {
omap2_set_globals_tap(omap2_globals); omap2_set_globals_tap(omap2_globals);
...@@ -39,8 +37,6 @@ static void __init __omap2_set_globals(struct omap_globals *omap2_globals) ...@@ -39,8 +37,6 @@ static void __init __omap2_set_globals(struct omap_globals *omap2_globals)
omap2_set_globals_prcm(omap2_globals); omap2_set_globals_prcm(omap2_globals);
} }
#endif
#if defined(CONFIG_SOC_OMAP2420) #if defined(CONFIG_SOC_OMAP2420)
static struct omap_globals omap242x_globals = { static struct omap_globals omap242x_globals = {
...@@ -173,9 +169,7 @@ static struct omap_globals omap4_globals = { ...@@ -173,9 +169,7 @@ static struct omap_globals omap4_globals = {
void __init omap2_set_globals_443x(void) void __init omap2_set_globals_443x(void)
{ {
omap2_set_globals_tap(&omap4_globals); __omap2_set_globals(&omap4_globals);
omap2_set_globals_control(&omap4_globals);
omap2_set_globals_prcm(&omap4_globals);
} }
void __init omap4_map_io(void) void __init omap4_map_io(void)
......
...@@ -174,7 +174,12 @@ void omap2_set_globals_am33xx(void); ...@@ -174,7 +174,12 @@ void omap2_set_globals_am33xx(void);
/* These get called from omap2_set_globals_xxxx(), do not call these */ /* These get called from omap2_set_globals_xxxx(), do not call these */
void omap2_set_globals_tap(struct omap_globals *); void omap2_set_globals_tap(struct omap_globals *);
#if defined(CONFIG_SOC_HAS_OMAP2_SDRC)
void omap2_set_globals_sdrc(struct omap_globals *); void omap2_set_globals_sdrc(struct omap_globals *);
#else
static inline void omap2_set_globals_sdrc(struct omap_globals *omap2_globals)
{ }
#endif
void omap2_set_globals_control(struct omap_globals *); void omap2_set_globals_control(struct omap_globals *);
void omap2_set_globals_prcm(struct omap_globals *); void omap2_set_globals_prcm(struct omap_globals *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment