diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2008-02-04 11:41:01 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-02-04 12:52:25 -0500 |
commit | c4057f5260650f165054bc56e16acc4aa0510d4f (patch) | |
tree | 8f1bf4de169c49fc61dd6dc0717b1d184c067d39 /arch/arm | |
parent | 7dd19e755dbe481ae42590dbd921dfd47e94779c (diff) |
[ARM] 4819/1: RealView: Fix entry-macro.S to work with multiple platforms
This patch modifies the get_irqnr_preamble macro to work with multiple
platforms at run-time by reading the address of the GIC controller from
the gic_cpu_base_addr variable. This variable is defined in core.c and
intialised in realview_eb.c (gic_init_irq).
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-realview/core.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-realview/core.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-realview/realview_eb.c | 6 |
3 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 046d31ce27b0..29514ac94f34 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -50,6 +50,9 @@ | |||
50 | 50 | ||
51 | #define REALVIEW_REFCOUNTER (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_24MHz_OFFSET) | 51 | #define REALVIEW_REFCOUNTER (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_24MHz_OFFSET) |
52 | 52 | ||
53 | /* used by entry-macro.S */ | ||
54 | void __iomem *gic_cpu_base_addr; | ||
55 | |||
53 | /* | 56 | /* |
54 | * This is the RealView sched_clock implementation. This has | 57 | * This is the RealView sched_clock implementation. This has |
55 | * a resolution of 41.7ns, and a maximum value of about 179s. | 58 | * a resolution of 41.7ns, and a maximum value of about 179s. |
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h index 9206db7b80bc..1c091372be6c 100644 --- a/arch/arm/mach-realview/core.h +++ b/arch/arm/mach-realview/core.h | |||
@@ -52,6 +52,7 @@ extern struct mmc_platform_data realview_mmc0_plat_data; | |||
52 | extern struct mmc_platform_data realview_mmc1_plat_data; | 52 | extern struct mmc_platform_data realview_mmc1_plat_data; |
53 | extern struct clk realview_clcd_clk; | 53 | extern struct clk realview_clcd_clk; |
54 | extern struct clcd_board clcd_plat_data; | 54 | extern struct clcd_board clcd_plat_data; |
55 | extern void __iomem *gic_cpu_base_addr; | ||
55 | 56 | ||
56 | extern void realview_leds_event(led_event_t ledevt); | 57 | extern void realview_leds_event(led_event_t ledevt); |
57 | 58 | ||
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index e42ac56e4db5..f36af1335024 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -256,8 +256,9 @@ static void __init gic_init_irq(void) | |||
256 | writel(0x00000000, __io_address(REALVIEW_SYS_LOCK)); | 256 | writel(0x00000000, __io_address(REALVIEW_SYS_LOCK)); |
257 | 257 | ||
258 | /* core tile GIC, primary */ | 258 | /* core tile GIC, primary */ |
259 | gic_cpu_base_addr = __io_address(REALVIEW_EB11MP_GIC_CPU_BASE); | ||
259 | gic_dist_init(0, __io_address(REALVIEW_EB11MP_GIC_DIST_BASE), 29); | 260 | gic_dist_init(0, __io_address(REALVIEW_EB11MP_GIC_DIST_BASE), 29); |
260 | gic_cpu_init(0, __io_address(REALVIEW_EB11MP_GIC_CPU_BASE)); | 261 | gic_cpu_init(0, gic_cpu_base_addr); |
261 | 262 | ||
262 | #ifndef CONFIG_REALVIEW_MPCORE_REVB | 263 | #ifndef CONFIG_REALVIEW_MPCORE_REVB |
263 | /* board GIC, secondary */ | 264 | /* board GIC, secondary */ |
@@ -267,8 +268,9 @@ static void __init gic_init_irq(void) | |||
267 | #endif | 268 | #endif |
268 | } else { | 269 | } else { |
269 | /* board GIC, primary */ | 270 | /* board GIC, primary */ |
271 | gic_cpu_base_addr = __io_address(REALVIEW_GIC_CPU_BASE); | ||
270 | gic_dist_init(0, __io_address(REALVIEW_GIC_DIST_BASE), 29); | 272 | gic_dist_init(0, __io_address(REALVIEW_GIC_DIST_BASE), 29); |
271 | gic_cpu_init(0, __io_address(REALVIEW_GIC_CPU_BASE)); | 273 | gic_cpu_init(0, gic_cpu_base_addr); |
272 | } | 274 | } |
273 | } | 275 | } |
274 | 276 | ||