Commit 2d6dd171 authored by Linus Walleij's avatar Linus Walleij

ARM: ux500: remove static maps from platsmp

This removes the reliance on static maps for SCU and backupram
for the SMP startup of the Ux500 SoC.
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 951b833e
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
#include "db8500-regs.h" #include "db8500-regs.h"
#include "id.h" #include "id.h"
static void __iomem *scu_base;
static void __iomem *backupram;
/* This is called from headsmp.S to wakeup the secondary core */ /* This is called from headsmp.S to wakeup the secondary core */
extern void u8500_secondary_startup(void); extern void u8500_secondary_startup(void);
...@@ -41,16 +44,6 @@ static void write_pen_release(int val) ...@@ -41,16 +44,6 @@ static void write_pen_release(int val)
sync_cache_w(&pen_release); sync_cache_w(&pen_release);
} }
static void __iomem *scu_base_addr(void)
{
if (cpu_is_u8500_family() || cpu_is_ux540_family())
return __io_address(U8500_SCU_BASE);
else
ux500_unknown_soc();
return NULL;
}
static DEFINE_SPINLOCK(boot_lock); static DEFINE_SPINLOCK(boot_lock);
static void ux500_secondary_init(unsigned int cpu) static void ux500_secondary_init(unsigned int cpu)
...@@ -104,13 +97,6 @@ static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle) ...@@ -104,13 +97,6 @@ static int ux500_boot_secondary(unsigned int cpu, struct task_struct *idle)
static void __init wakeup_secondary(void) static void __init wakeup_secondary(void)
{ {
void __iomem *backupram;
if (cpu_is_u8500_family() || cpu_is_ux540_family())
backupram = __io_address(U8500_BACKUPRAM0_BASE);
else
ux500_unknown_soc();
/* /*
* write the address of secondary startup into the backup ram register * write the address of secondary startup into the backup ram register
* at offset 0x1FF4, then write the magic number 0xA1FEED01 to the * at offset 0x1FF4, then write the magic number 0xA1FEED01 to the
...@@ -135,10 +121,11 @@ static void __init wakeup_secondary(void) ...@@ -135,10 +121,11 @@ static void __init wakeup_secondary(void)
*/ */
static void __init ux500_smp_init_cpus(void) static void __init ux500_smp_init_cpus(void)
{ {
void __iomem *scu_base = scu_base_addr();
unsigned int i, ncores; unsigned int i, ncores;
ncores = scu_base ? scu_get_core_count(scu_base) : 1; scu_base = ioremap(U8500_SCU_BASE, 0x100);
backupram = ioremap(U8500_BACKUPRAM0_BASE, SZ_8K);
ncores = scu_get_core_count(scu_base);
/* sanity check */ /* sanity check */
if (ncores > nr_cpu_ids) { if (ncores > nr_cpu_ids) {
...@@ -153,8 +140,7 @@ static void __init ux500_smp_init_cpus(void) ...@@ -153,8 +140,7 @@ static void __init ux500_smp_init_cpus(void)
static void __init ux500_smp_prepare_cpus(unsigned int max_cpus) static void __init ux500_smp_prepare_cpus(unsigned int max_cpus)
{ {
scu_enable(scu_base);
scu_enable(scu_base_addr());
wakeup_secondary(); wakeup_secondary();
} }
......
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