Commit 6a2b5343 authored by Gregory CLEMENT's avatar Gregory CLEMENT Committed by Jason Cooper

ARM: mvebu: export the SCU address

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: default avatarGregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1406120453-29291-10-git-send-email-thomas.petazzoni@free-electrons.comSigned-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent 5da964e0
...@@ -34,14 +34,14 @@ ...@@ -34,14 +34,14 @@
#include "coherency.h" #include "coherency.h"
#include "mvebu-soc-id.h" #include "mvebu-soc-id.h"
static void __iomem *scu_base;
/* /*
* Enables the SCU when available. Obviously, this is only useful on * Enables the SCU when available. Obviously, this is only useful on
* Cortex-A based SOCs, not on PJ4B based ones. * Cortex-A based SOCs, not on PJ4B based ones.
*/ */
static void __init mvebu_scu_enable(void) static void __init mvebu_scu_enable(void)
{ {
void __iomem *scu_base;
struct device_node *np = struct device_node *np =
of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu"); of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu");
if (np) { if (np) {
...@@ -51,6 +51,11 @@ static void __init mvebu_scu_enable(void) ...@@ -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 * Early versions of Armada 375 SoC have a bug where the BootROM
* leaves an external data abort pending. The kernel is hit by this * leaves an external data abort pending. The kernel is hit by this
......
...@@ -23,4 +23,6 @@ void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr); ...@@ -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); void mvebu_system_controller_set_cpu_boot_addr(void *boot_addr);
int mvebu_system_controller_get_soc_id(u32 *dev, u32 *rev); int mvebu_system_controller_get_soc_id(u32 *dev, u32 *rev);
void __iomem *mvebu_get_scu_base(void);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment