aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/io.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-12-09 18:49:23 -0500
committerTony Lindgren <tony@atomide.com>2010-12-10 12:42:51 -0500
commit5d190c40100793a6dfc37bf325677c10f3c80edf (patch)
treedeb1dd54ec3b056fb10ed2ae24729cba7505bb85 /arch/arm/mach-omap2/io.c
parent03a9e5126147c9f92aeba4b34f62b15b625087fb (diff)
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.c22
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 @@
46#include "clockdomains.h" 46#include "clockdomains.h"
47 47
48#include <plat/omap_hwmod.h> 48#include <plat/omap_hwmod.h>
49#include <plat/multi.h>
49 50
50/* 51/*
51 * The machine specific code may provide the extra mapping besides the 52 * The machine specific code may provide the extra mapping besides the
@@ -311,6 +312,25 @@ static int __init _omap2_init_reprogram_sdrc(void)
311 return v; 312 return v;
312} 313}
313 314
315/*
316 * Initialize asm_irq_base for entry-macro.S
317 */
318static inline void omap_irq_base_init(void)
319{
320 extern void __iomem *omap_irq_base;
321
322#ifdef MULTI_OMAP2
323 if (cpu_is_omap242x())
324 omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE);
325 else if (cpu_is_omap34xx())
326 omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE);
327 else if (cpu_is_omap44xx())
328 omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE);
329 else
330 pr_err("Could not initialize omap_irq_base\n");
331#endif
332}
333
314void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, 334void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
315 struct omap_sdrc_params *sdrc_cs1) 335 struct omap_sdrc_params *sdrc_cs1)
316{ 336{
@@ -352,4 +372,6 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
352 _omap2_init_reprogram_sdrc(); 372 _omap2_init_reprogram_sdrc();
353 } 373 }
354 gpmc_init(); 374 gpmc_init();
375
376 omap_irq_base_init();
355} 377}