]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
[ARM] 4819/1: RealView: Fix entry-macro.S to work with multiple platforms
authorCatalin Marinas <catalin.marinas@arm.com>
Mon, 4 Feb 2008 16:41:01 +0000 (17:41 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 4 Feb 2008 17:52:25 +0000 (17:52 +0000)
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>
arch/arm/mach-realview/core.c
arch/arm/mach-realview/core.h
arch/arm/mach-realview/realview_eb.c
include/asm-arm/arch-realview/entry-macro.S

index 046d31ce27b09741985f2d9ee36cf0b43184b5ef..29514ac94f342ac9e6861e27056d5cf79236b5c7 100644 (file)
@@ -50,6 +50,9 @@
 
 #define REALVIEW_REFCOUNTER    (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_24MHz_OFFSET)
 
+/* used by entry-macro.S */
+void __iomem *gic_cpu_base_addr;
+
 /*
  * This is the RealView sched_clock implementation.  This has
  * a resolution of 41.7ns, and a maximum value of about 179s.
index 9206db7b80bcf1321052c8bb9ddb73d447c81933..1c091372be6c4b03b73728f9f5e089c753a90916 100644 (file)
@@ -52,6 +52,7 @@ extern struct mmc_platform_data realview_mmc0_plat_data;
 extern struct mmc_platform_data realview_mmc1_plat_data;
 extern struct clk realview_clcd_clk;
 extern struct clcd_board clcd_plat_data;
+extern void __iomem *gic_cpu_base_addr;
 
 extern void realview_leds_event(led_event_t ledevt);
 
index e42ac56e4db5960a793634740d4f29b73d4fc3ed..f36af13350248921c0145c83d47f9b0b571ac46e 100644 (file)
@@ -256,8 +256,9 @@ static void __init gic_init_irq(void)
                writel(0x00000000, __io_address(REALVIEW_SYS_LOCK));
 
                /* core tile GIC, primary */
+               gic_cpu_base_addr = __io_address(REALVIEW_EB11MP_GIC_CPU_BASE);
                gic_dist_init(0, __io_address(REALVIEW_EB11MP_GIC_DIST_BASE), 29);
-               gic_cpu_init(0, __io_address(REALVIEW_EB11MP_GIC_CPU_BASE));
+               gic_cpu_init(0, gic_cpu_base_addr);
 
 #ifndef CONFIG_REALVIEW_MPCORE_REVB
                /* board GIC, secondary */
@@ -267,8 +268,9 @@ static void __init gic_init_irq(void)
 #endif
        } else {
                /* board GIC, primary */
+               gic_cpu_base_addr = __io_address(REALVIEW_GIC_CPU_BASE);
                gic_dist_init(0, __io_address(REALVIEW_GIC_DIST_BASE), 29);
-               gic_cpu_init(0, __io_address(REALVIEW_GIC_CPU_BASE));
+               gic_cpu_init(0, gic_cpu_base_addr);
        }
 }
 
index 629944deed504305066814ce50cb78deb2eb8472..cd26306d8e57f8d2ecff1361ece23315485473d8 100644 (file)
@@ -9,17 +9,13 @@
  */
 #include <asm/hardware.h>
 #include <asm/hardware/gic.h>
-#include <asm/arch/board-eb.h>
 
                .macro  disable_fiq
                .endm
 
                .macro  get_irqnr_preamble, base, tmp
-#ifdef CONFIG_REALVIEW_MPCORE
-               ldr     \base, =IO_ADDRESS(REALVIEW_EB11MP_GIC_CPU_BASE)
-#else
-               ldr     \base, =IO_ADDRESS(REALVIEW_GIC_CPU_BASE)
-#endif
+               ldr     \base, =gic_cpu_base_addr
+               ldr     \base, [\base]
                .endm
 
                .macro  arch_ret_to_user, tmp1, tmp2