diff options
| author | Kyungmin Park <kyungmin.park@samsung.com> | 2014-05-08 17:19:18 -0400 |
|---|---|---|
| committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-05-14 15:12:45 -0400 |
| commit | 989ff3fdf939b15f0cb91406746da0ded0c06ef0 (patch) | |
| tree | 2220b575439ac05efc9e3a566b31a51f6650564c | |
| parent | 89ca3b881987f5a4be4c5dbaa7f0df12bbdde2fd (diff) | |
ARM: EXYNOS: fix the secondary CPU boot of exynos4212
This patch fixes the offset of CPU boot address and changes
the parameter of smc call for SMC_CMD_CPU1BOOT command on
exynos4212.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
| -rw-r--r-- | arch/arm/mach-exynos/firmware.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c index 932129ef26c6..aa01c4222b40 100644 --- a/arch/arm/mach-exynos/firmware.c +++ b/arch/arm/mach-exynos/firmware.c | |||
| @@ -18,6 +18,8 @@ | |||
| 18 | 18 | ||
| 19 | #include <mach/map.h> | 19 | #include <mach/map.h> |
| 20 | 20 | ||
| 21 | #include <plat/cpu.h> | ||
| 22 | |||
| 21 | #include "smc.h" | 23 | #include "smc.h" |
| 22 | 24 | ||
| 23 | static int exynos_do_idle(void) | 25 | static int exynos_do_idle(void) |
| @@ -28,13 +30,24 @@ static int exynos_do_idle(void) | |||
| 28 | 30 | ||
| 29 | static int exynos_cpu_boot(int cpu) | 31 | static int exynos_cpu_boot(int cpu) |
| 30 | { | 32 | { |
| 33 | /* | ||
| 34 | * The second parameter of SMC_CMD_CPU1BOOT command means CPU id. | ||
| 35 | * But, Exynos4212 has only one secondary CPU so second parameter | ||
| 36 | * isn't used for informing secure firmware about CPU id. | ||
| 37 | */ | ||
| 38 | if (soc_is_exynos4212()) | ||
| 39 | cpu = 0; | ||
| 40 | |||
| 31 | exynos_smc(SMC_CMD_CPU1BOOT, cpu, 0, 0); | 41 | exynos_smc(SMC_CMD_CPU1BOOT, cpu, 0, 0); |
| 32 | return 0; | 42 | return 0; |
| 33 | } | 43 | } |
| 34 | 44 | ||
| 35 | static int exynos_set_cpu_boot_addr(int cpu, unsigned long boot_addr) | 45 | static int exynos_set_cpu_boot_addr(int cpu, unsigned long boot_addr) |
| 36 | { | 46 | { |
| 37 | void __iomem *boot_reg = S5P_VA_SYSRAM_NS + 0x1c + 4*cpu; | 47 | void __iomem *boot_reg = S5P_VA_SYSRAM_NS + 0x1c; |
| 48 | |||
| 49 | if (!soc_is_exynos4212()) | ||
| 50 | boot_reg += 4*cpu; | ||
| 38 | 51 | ||
| 39 | __raw_writel(boot_addr, boot_reg); | 52 | __raw_writel(boot_addr, boot_reg); |
| 40 | return 0; | 53 | return 0; |
