]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: OMAP4: Export omap4_get_base*() rather than global address pointers
authorSantosh Shilimkar <santosh.shilimkar@ti.com>
Thu, 3 Mar 2011 12:33:25 +0000 (18:03 +0530)
committerKevin Hilman <khilman@ti.com>
Thu, 8 Dec 2011 19:28:59 +0000 (11:28 -0800)
This patch exports APIs to get base address for GIC
distributor, CPU interface, SCU and PL310 L2 Cache which
are used in OMAP4 PM code.

This was suggested by Kevin Hilman <khilman@ti.com> during
OMAP4 PM code review.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Jean Pihet <j-pihet@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Tested-by: Vishwanath BS <vishwanath.bs@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
arch/arm/mach-omap2/common.h
arch/arm/mach-omap2/omap-smp.c
arch/arm/mach-omap2/omap4-common.c

index 012bac7d56a593c5234788dac459df27a4bb92cf..ca04152a9199fb8dba03f43837c8463def51d08c 100644 (file)
@@ -168,7 +168,16 @@ void omap3_intc_handle_irq(struct pt_regs *regs);
 #endif
 
 #ifdef CONFIG_CACHE_L2X0
-extern void __iomem *l2cache_base;
+extern void __iomem *omap4_get_l2cache_base(void);
+#endif
+
+#ifdef CONFIG_SMP
+extern void __iomem *omap4_get_scu_base(void);
+#else
+static inline void __iomem *omap4_get_scu_base(void)
+{
+       return NULL;
+}
 #endif
 
 extern void __init gic_init_irq(void);
index e99bc6cd47140aae1907966c3d9647f5eda45515..74e90b40a0c76c179c1ae0ca35e34fd9e65a09ab 100644 (file)
@@ -32,6 +32,11 @@ static void __iomem *scu_base;
 
 static DEFINE_SPINLOCK(boot_lock);
 
+void __iomem *omap4_get_scu_base(void)
+{
+       return scu_base;
+}
+
 void __cpuinit platform_secondary_init(unsigned int cpu)
 {
        /*
index 21d4821c9612c8fb8f6da42ffc798baf71c83fc4..4a3d2898543bbae0140dbf4e75c8c47d74517d80 100644 (file)
@@ -26,7 +26,7 @@
 #include "common.h"
 
 #ifdef CONFIG_CACHE_L2X0
-void __iomem *l2cache_base;
+static void __iomem *l2cache_base;
 #endif
 
 void __init gic_init_irq(void)
@@ -47,6 +47,11 @@ void __init gic_init_irq(void)
 
 #ifdef CONFIG_CACHE_L2X0
 
+void __iomem *omap4_get_l2cache_base(void)
+{
+       return l2cache_base;
+}
+
 static void omap4_l2x0_disable(void)
 {
        /* Disable PL310 L2 Cache controller */