From 5d190c40100793a6dfc37bf325677c10f3c80edf Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Thu, 9 Dec 2010 15:49:23 -0800 Subject: omap2+: Initialize omap_irq_base for entry-macro.S from platform code This way we can use the generic omap SoC detection code instead. Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/io.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'arch/arm/mach-omap2/io.c') diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 40562ddd3ee4..3d1834906293 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -46,6 +46,7 @@ #include "clockdomains.h" #include +#include /* * The machine specific code may provide the extra mapping besides the @@ -311,6 +312,25 @@ static int __init _omap2_init_reprogram_sdrc(void) return v; } +/* + * Initialize asm_irq_base for entry-macro.S + */ +static inline void omap_irq_base_init(void) +{ + extern void __iomem *omap_irq_base; + +#ifdef MULTI_OMAP2 + if (cpu_is_omap242x()) + omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE); + else if (cpu_is_omap34xx()) + omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE); + else if (cpu_is_omap44xx()) + omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE); + else + pr_err("Could not initialize omap_irq_base\n"); +#endif +} + void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, struct omap_sdrc_params *sdrc_cs1) { @@ -352,4 +372,6 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, _omap2_init_reprogram_sdrc(); } gpmc_init(); + + omap_irq_base_init(); } -- cgit v1.2.3