Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c4057f5260650f165054bc56e16acc4aa0510d4f
Commit:     c4057f5260650f165054bc56e16acc4aa0510d4f
Parent:     7dd19e755dbe481ae42590dbd921dfd47e94779c
Author:     Catalin Marinas <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 17:41:01 2008 +0100
Committer:  Russell King <[EMAIL PROTECTED]>
CommitDate: Mon Feb 4 17:52:25 2008 +0000

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
---
 arch/arm/mach-realview/core.c               |    3 +++
 arch/arm/mach-realview/core.h               |    1 +
 arch/arm/mach-realview/realview_eb.c        |    6 ++++--
 include/asm-arm/arch-realview/entry-macro.S |    8 ++------
 4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index 046d31c..29514ac 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -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.
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
index 9206db7..1c09137 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;
 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);
 
diff --git a/arch/arm/mach-realview/realview_eb.c 
b/arch/arm/mach-realview/realview_eb.c
index e42ac56..f36af13 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)
                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);
        }
 }
 
diff --git a/include/asm-arm/arch-realview/entry-macro.S 
b/include/asm-arm/arch-realview/entry-macro.S
index 629944d..cd26306 100644
--- a/include/asm-arm/arch-realview/entry-macro.S
+++ b/include/asm-arm/arch-realview/entry-macro.S
@@ -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
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to