Commit 133ad7ab authored by Tony Lindgren's avatar Tony Lindgren

ARM: OMAP2+: Build hwmod related code as needed

If we have only am3 selected, there's no need to build the
hwmod related code as we are probing devices with device tree
data.
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 68fc5990
...@@ -2,11 +2,15 @@ ...@@ -2,11 +2,15 @@
menu "TI OMAP/AM/DM/DRA Family" menu "TI OMAP/AM/DM/DRA Family"
depends on ARCH_MULTI_V6 || ARCH_MULTI_V7 depends on ARCH_MULTI_V6 || ARCH_MULTI_V7
config OMAP_HWMOD
bool
config ARCH_OMAP2 config ARCH_OMAP2
bool "TI OMAP2" bool "TI OMAP2"
depends on ARCH_MULTI_V6 depends on ARCH_MULTI_V6
select ARCH_OMAP2PLUS select ARCH_OMAP2PLUS
select CPU_V6 select CPU_V6
select OMAP_HWMOD
select SOC_HAS_OMAP2_SDRC select SOC_HAS_OMAP2_SDRC
config ARCH_OMAP3 config ARCH_OMAP3
...@@ -14,6 +18,7 @@ config ARCH_OMAP3 ...@@ -14,6 +18,7 @@ config ARCH_OMAP3
depends on ARCH_MULTI_V7 depends on ARCH_MULTI_V7
select ARCH_OMAP2PLUS select ARCH_OMAP2PLUS
select ARM_CPU_SUSPEND if PM select ARM_CPU_SUSPEND if PM
select OMAP_HWMOD
select OMAP_INTERCONNECT select OMAP_INTERCONNECT
select PM_OPP if PM select PM_OPP if PM
select PM if CPU_IDLE select PM if CPU_IDLE
...@@ -30,6 +35,7 @@ config ARCH_OMAP4 ...@@ -30,6 +35,7 @@ config ARCH_OMAP4
select ARM_GIC select ARM_GIC
select HAVE_ARM_SCU if SMP select HAVE_ARM_SCU if SMP
select HAVE_ARM_TWD if SMP select HAVE_ARM_TWD if SMP
select OMAP_HWMOD
select OMAP_INTERCONNECT select OMAP_INTERCONNECT
select OMAP_INTERCONNECT_BARRIER select OMAP_INTERCONNECT_BARRIER
select PL310_ERRATA_588369 if CACHE_L2X0 select PL310_ERRATA_588369 if CACHE_L2X0
...@@ -49,6 +55,7 @@ config SOC_OMAP5 ...@@ -49,6 +55,7 @@ config SOC_OMAP5
select HAVE_ARM_SCU if SMP select HAVE_ARM_SCU if SMP
select HAVE_ARM_ARCH_TIMER select HAVE_ARM_ARCH_TIMER
select ARM_ERRATA_798181 if SMP select ARM_ERRATA_798181 if SMP
select OMAP_HWMOD
select OMAP_INTERCONNECT select OMAP_INTERCONNECT
select OMAP_INTERCONNECT_BARRIER select OMAP_INTERCONNECT_BARRIER
select PM_OPP if PM select PM_OPP if PM
...@@ -71,6 +78,7 @@ config SOC_AM43XX ...@@ -71,6 +78,7 @@ config SOC_AM43XX
select HAVE_ARM_TWD select HAVE_ARM_TWD
select ARM_ERRATA_754322 select ARM_ERRATA_754322
select ARM_ERRATA_775420 select ARM_ERRATA_775420
select OMAP_HWMOD
select OMAP_INTERCONNECT select OMAP_INTERCONNECT
select ARM_CPU_SUSPEND if PM select ARM_CPU_SUSPEND if PM
...@@ -84,6 +92,7 @@ config SOC_DRA7XX ...@@ -84,6 +92,7 @@ config SOC_DRA7XX
select HAVE_ARM_ARCH_TIMER select HAVE_ARM_ARCH_TIMER
select IRQ_CROSSBAR select IRQ_CROSSBAR
select ARM_ERRATA_798181 if SMP select ARM_ERRATA_798181 if SMP
select OMAP_HWMOD
select OMAP_INTERCONNECT select OMAP_INTERCONNECT
select OMAP_INTERCONNECT_BARRIER select OMAP_INTERCONNECT_BARRIER
select PM_OPP if PM select PM_OPP if PM
......
...@@ -8,18 +8,20 @@ ccflags-y := -I$(srctree)/$(src)/include \ ...@@ -8,18 +8,20 @@ ccflags-y := -I$(srctree)/$(src)/include \
# Common support # Common support
obj-y := id.o io.o control.o devices.o fb.o pm.o \ obj-y := id.o io.o control.o devices.o fb.o pm.o \
common.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \ common.o dma.o omap-headsmp.o sram.o
omap_device.o omap-headsmp.o sram.o
hwmod-common = omap_hwmod.o omap_hwmod_reset.o \ hwmod-common = omap_hwmod.o omap_hwmod_reset.o \
omap_hwmod_common_data.o omap_hwmod_common_data.o \
omap_hwmod_common_ipblock_data.o \
omap_device.o display.o hdq1w.o \
i2c.o wd_timer.o
clock-common = clock.o clock-common = clock.o
secure-common = omap-smc.o omap-secure.o secure-common = omap-smc.o omap-secure.o
obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common) obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common)
obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common) obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common)
obj-$(CONFIG_ARCH_OMAP4) += $(hwmod-common) $(secure-common) obj-$(CONFIG_ARCH_OMAP4) += $(hwmod-common) $(secure-common)
obj-$(CONFIG_SOC_AM33XX) += $(hwmod-common) $(secure-common) obj-$(CONFIG_SOC_AM33XX) += $(secure-common)
obj-$(CONFIG_SOC_OMAP5) += $(hwmod-common) $(secure-common) obj-$(CONFIG_SOC_OMAP5) += $(hwmod-common) $(secure-common)
obj-$(CONFIG_SOC_AM43XX) += $(hwmod-common) $(secure-common) obj-$(CONFIG_SOC_AM43XX) += $(hwmod-common) $(secure-common)
obj-$(CONFIG_SOC_DRA7XX) += $(hwmod-common) $(secure-common) obj-$(CONFIG_SOC_DRA7XX) += $(hwmod-common) $(secure-common)
...@@ -194,7 +196,6 @@ obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o ...@@ -194,7 +196,6 @@ obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o
obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o
# hwmod data # hwmod data
obj-y += omap_hwmod_common_ipblock_data.o
obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_ipblock_data.o obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_ipblock_data.o
obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_3xxx_ipblock_data.o obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_3xxx_ipblock_data.o
obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_interconnect_data.o obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_interconnect_data.o
...@@ -205,8 +206,6 @@ obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2xxx_interconnect_data.o ...@@ -205,8 +206,6 @@ obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2xxx_interconnect_data.o
obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2430_data.o obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2430_data.o
obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_ipblock_data.o obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_ipblock_data.o
obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o
obj-$(CONFIG_SOC_AM33XX) += omap_hwmod_33xx_43xx_interconnect_data.o
obj-$(CONFIG_SOC_AM33XX) += omap_hwmod_33xx_43xx_ipblock_data.o
obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_43xx_data.o obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_43xx_data.o
obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_33xx_43xx_interconnect_data.o obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_33xx_43xx_interconnect_data.o
obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_33xx_43xx_ipblock_data.o obj-$(CONFIG_SOC_AM43XX) += omap_hwmod_33xx_43xx_ipblock_data.o
......
...@@ -94,6 +94,7 @@ static void __init hsmmc2_internal_input_clk(void) ...@@ -94,6 +94,7 @@ static void __init hsmmc2_internal_input_clk(void)
omap_ctrl_writel(reg, OMAP343X_CONTROL_DEVCONF1); omap_ctrl_writel(reg, OMAP343X_CONTROL_DEVCONF1);
} }
#ifdef CONFIG_OMAP_HWMOD
static struct iommu_platform_data omap3_iommu_pdata = { static struct iommu_platform_data omap3_iommu_pdata = {
.reset_name = "mmu", .reset_name = "mmu",
.assert_reset = omap_device_assert_hardreset, .assert_reset = omap_device_assert_hardreset,
...@@ -106,6 +107,7 @@ static struct iommu_platform_data omap3_iommu_isp_pdata = { ...@@ -106,6 +107,7 @@ static struct iommu_platform_data omap3_iommu_isp_pdata = {
.device_enable = omap_device_enable, .device_enable = omap_device_enable,
.device_idle = omap_device_idle, .device_idle = omap_device_idle,
}; };
#endif
static int omap3_sbc_t3730_twl_callback(struct device *dev, static int omap3_sbc_t3730_twl_callback(struct device *dev,
unsigned gpio, unsigned gpio,
...@@ -272,7 +274,7 @@ static void __init omap3_pandora_legacy_init(void) ...@@ -272,7 +274,7 @@ static void __init omap3_pandora_legacy_init(void)
} }
#endif /* CONFIG_ARCH_OMAP3 */ #endif /* CONFIG_ARCH_OMAP3 */
#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX) #if defined(CONFIG_SOC_AM43XX)
static struct wkup_m3_platform_data wkup_m3_data = { static struct wkup_m3_platform_data wkup_m3_data = {
.reset_name = "wkup_m3", .reset_name = "wkup_m3",
.assert_reset = omap_device_assert_hardreset, .assert_reset = omap_device_assert_hardreset,
...@@ -370,6 +372,7 @@ static void ti_sysc_clkdm_allow_idle(struct device *dev, ...@@ -370,6 +372,7 @@ static void ti_sysc_clkdm_allow_idle(struct device *dev,
clkdm_allow_idle(cookie->clkdm); clkdm_allow_idle(cookie->clkdm);
} }
#ifdef CONFIG_OMAP_HWMOD
static int ti_sysc_enable_module(struct device *dev, static int ti_sysc_enable_module(struct device *dev,
const struct ti_sysc_cookie *cookie) const struct ti_sysc_cookie *cookie)
{ {
...@@ -396,6 +399,7 @@ static int ti_sysc_shutdown_module(struct device *dev, ...@@ -396,6 +399,7 @@ static int ti_sysc_shutdown_module(struct device *dev,
return omap_hwmod_shutdown(cookie->data); return omap_hwmod_shutdown(cookie->data);
} }
#endif /* CONFIG_OMAP_HWMOD */
static bool ti_sysc_soc_type_gp(void) static bool ti_sysc_soc_type_gp(void)
{ {
...@@ -410,10 +414,12 @@ static struct ti_sysc_platform_data ti_sysc_pdata = { ...@@ -410,10 +414,12 @@ static struct ti_sysc_platform_data ti_sysc_pdata = {
.init_clockdomain = ti_sysc_clkdm_init, .init_clockdomain = ti_sysc_clkdm_init,
.clkdm_deny_idle = ti_sysc_clkdm_deny_idle, .clkdm_deny_idle = ti_sysc_clkdm_deny_idle,
.clkdm_allow_idle = ti_sysc_clkdm_allow_idle, .clkdm_allow_idle = ti_sysc_clkdm_allow_idle,
#ifdef CONFIG_OMAP_HWMOD
.init_module = omap_hwmod_init_module, .init_module = omap_hwmod_init_module,
.enable_module = ti_sysc_enable_module, .enable_module = ti_sysc_enable_module,
.idle_module = ti_sysc_idle_module, .idle_module = ti_sysc_idle_module,
.shutdown_module = ti_sysc_shutdown_module, .shutdown_module = ti_sysc_shutdown_module,
#endif
}; };
static struct pcs_pdata pcs_pdata; static struct pcs_pdata pcs_pdata;
...@@ -501,10 +507,6 @@ static struct of_dev_auxdata omap_auxdata_lookup[] = { ...@@ -501,10 +507,6 @@ static struct of_dev_auxdata omap_auxdata_lookup[] = {
OF_DEV_AUXDATA("ti,omap3-mcbsp", 0x49024000, "49024000.mcbsp", &mcbsp_pdata), OF_DEV_AUXDATA("ti,omap3-mcbsp", 0x49024000, "49024000.mcbsp", &mcbsp_pdata),
#endif #endif
#endif #endif
#ifdef CONFIG_SOC_AM33XX
OF_DEV_AUXDATA("ti,am3352-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
&wkup_m3_data),
#endif
#ifdef CONFIG_SOC_AM43XX #ifdef CONFIG_SOC_AM43XX
OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3", OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
&wkup_m3_data), &wkup_m3_data),
......
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