]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: mvebu: export the SCU address
authorGregory CLEMENT <gregory.clement@free-electrons.com>
Wed, 23 Jul 2014 13:00:46 +0000 (15:00 +0200)
committerJason Cooper <jason@lakedaemon.net>
Thu, 24 Jul 2014 11:46:40 +0000 (11:46 +0000)
The SCU address will be needed in other files than board-v7.c,
especially in pmsu.c for cpuidle related activities. So this patch
adds a function that allows to retrieve the virtual address at which
the SCU has been mapped.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1406120453-29291-10-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
arch/arm/mach-mvebu/board-v7.c
arch/arm/mach-mvebu/common.h

index f244622ffc005a6d70b5eb7a8d6a7dcb989933e4..6478626e3ff64c035e11ac69a290099c44d972a8 100644 (file)
 #include "coherency.h"
 #include "mvebu-soc-id.h"
 
+static void __iomem *scu_base;
+
 /*
  * Enables the SCU when available. Obviously, this is only useful on
  * Cortex-A based SOCs, not on PJ4B based ones.
  */
 static void __init mvebu_scu_enable(void)
 {
-       void __iomem *scu_base;
-
        struct device_node *np =
                of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu");
        if (np) {
@@ -51,6 +51,11 @@ static void __init mvebu_scu_enable(void)
        }
 }
 
+void __iomem *mvebu_get_scu_base(void)
+{
+       return scu_base;
+}
+
 /*
  * Early versions of Armada 375 SoC have a bug where the BootROM
  * leaves an external data abort pending. The kernel is hit by this
index a97778e28bf655e54eed958d3dc2500e5bbd6b91..3ccb40c3bf94d1af6c9afcedd1ff38b9f0a3f4e0 100644 (file)
@@ -23,4 +23,6 @@ void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr);
 void mvebu_system_controller_set_cpu_boot_addr(void *boot_addr);
 int mvebu_system_controller_get_soc_id(u32 *dev, u32 *rev);
 
+void __iomem *mvebu_get_scu_base(void);
+
 #endif