]> git.karo-electronics.de Git - linux-beck.git/blobdiff - arch/arm/mach-exynos/firmware.c
Merge tag 'samsung-dt' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux...
[linux-beck.git] / arch / arm / mach-exynos / firmware.c
index 483dfcd690650c54674584169b99ef00967964d0..4135edbc0270867a77c8772ec9d29a853b45cee1 100644 (file)
@@ -18,6 +18,8 @@
 
 #include <mach/map.h>
 
+#include <plat/cpu.h>
+
 #include "common.h"
 #include "smc.h"
 
@@ -29,6 +31,14 @@ static int exynos_do_idle(void)
 
 static int exynos_cpu_boot(int cpu)
 {
+       /*
+        * The second parameter of SMC_CMD_CPU1BOOT command means CPU id.
+        * But, Exynos4212 has only one secondary CPU so second parameter
+        * isn't used for informing secure firmware about CPU id.
+        */
+       if (soc_is_exynos4212())
+               cpu = 0;
+
        exynos_smc(SMC_CMD_CPU1BOOT, cpu, 0, 0);
        return 0;
 }
@@ -40,7 +50,10 @@ static int exynos_set_cpu_boot_addr(int cpu, unsigned long boot_addr)
        if (!sysram_ns_base_addr)
                return -ENODEV;
 
-       boot_reg = sysram_ns_base_addr + 0x1c + 4*cpu;
+       boot_reg = sysram_ns_base_addr + 0x1c;
+
+       if (!soc_is_exynos4212())
+               boot_reg += 4*cpu;
 
        __raw_writel(boot_addr, boot_reg);
        return 0;