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>
This commit is contained in:
Tony Lindgren
2010-12-09 15:49:23 -08:00
parent 03a9e51261
commit 5d190c4010
2 changed files with 39 additions and 31 deletions

View File

@ -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();
}