diff options
author | Tony Lindgren <tony@atomide.com> | 2010-12-09 15:49:23 -0800 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-12-10 09:42:51 -0800 |
commit | 5d190c40100793a6dfc37bf325677c10f3c80edf (patch) | |
tree | deb1dd54ec3b056fb10ed2ae24729cba7505bb85 /arch/arm/mach-omap2/io.c | |
parent | 03a9e5126147c9f92aeba4b34f62b15b625087fb (diff) | |
download | linux-3.10-5d190c40100793a6dfc37bf325677c10f3c80edf.tar.gz linux-3.10-5d190c40100793a6dfc37bf325677c10f3c80edf.tar.bz2 linux-3.10-5d190c40100793a6dfc37bf325677c10f3c80edf.zip |
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 <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/io.c')
-rw-r--r-- | arch/arm/mach-omap2/io.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 40562ddd3ee..3d183490629 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -46,6 +46,7 @@ #include "clockdomains.h" #include <plat/omap_hwmod.h> +#include <plat/multi.h> /* * 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(); } |