ARM: S5PV310: Fix on Secondary CPU startup
authorChanghwan Youn <chaos.youn@samsung.com>
Fri, 27 Aug 2010 08:57:44 +0000 (17:57 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Fri, 27 Aug 2010 09:29:58 +0000 (18:29 +0900)
Following occurs on boot message without this patch.
    CPU1: processor failed to boot
    Brought up 1 CPUs
    SMP: Total of 1 processors activated...

This patch adds SYSRAM mapping for fixing Secondary CPU startup.
    CPU1: Booted secondary processor
    Brought up 2 CPUs
    SMP: Total of 2 processors activated...

Signed-off-by: Changhwan Youn <chaos.youn@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-s5pv310/cpu.c
arch/arm/mach-s5pv310/include/mach/map.h
arch/arm/mach-s5pv310/platsmp.c
arch/arm/plat-s5p/include/plat/map-s5p.h

index 2b742957d5669e3f466b454142f3f979053d8d04..e5b261a99ab2678e5860d9c0055d493137ef1e42 100644 (file)
@@ -45,12 +45,17 @@ static struct map_desc s5pv310_iodesc[] __initdata = {
                .pfn            = __phys_to_pfn(S5PV310_PA_L2CC),
                .length         = SZ_4K,
                .type           = MT_DEVICE,
+       }, {
+               .virtual        = (unsigned long)S5P_VA_SYSRAM,
+               .pfn            = __phys_to_pfn(S5PV310_PA_SYSRAM),
+               .length         = SZ_4K,
+               .type           = MT_DEVICE,
        }, {
                .virtual        = (unsigned long)S5P_VA_CMU,
                .pfn            = __phys_to_pfn(S5PV310_PA_CMU),
                .length         = SZ_128K,
                .type           = MT_DEVICE,
-       }
+       },
 };
 
 static void s5pv310_idle(void)
index 3c00495c5f22343828498fc207b62902186a48dd..213e1101a3b325b60ada7c5bc5014035c1d8e74b 100644 (file)
@@ -23,6 +23,8 @@
 
 #include <plat/map-s5p.h>
 
+#define S5PV310_PA_SYSRAM              (0x02025000)
+
 #define S5PV310_PA_CHIPID              (0x10000000)
 #define S5P_PA_CHIPID                  S5PV310_PA_CHIPID
 
index fe9469abd0066190286d1e6dd382bb18073e24a7..d357c198edee308112bc3633256376ca69720abb 100644 (file)
@@ -187,6 +187,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
                 * until it receives a soft interrupt, and then the
                 * secondary CPU branches to this address.
                 */
-       __raw_writel(BSYM(virt_to_phys(s5pv310_secondary_startup)), S5P_INFORM0);
+       __raw_writel(BSYM(virt_to_phys(s5pv310_secondary_startup)), S5P_VA_SYSRAM);
        }
 }
index 589779205f126d1d03b8bd5e231c6a6a80f7c072..c4ff88bf6477d2797b6ba578c768b0edadaba073 100644 (file)
@@ -17,6 +17,7 @@
 #define S5P_VA_GPIO            S3C_ADDR(0x00500000)
 #define S5P_VA_SYSTIMER                S3C_ADDR(0x01200000)
 #define S5P_VA_SROMC           S3C_ADDR(0x01100000)
+#define S5P_VA_SYSRAM          S3C_ADDR(0x01180000)
 
 #define S5P_VA_COMBINER_BASE   S3C_ADDR(0x00600000)
 #define S5P_VA_COMBINER(x)     (S5P_VA_COMBINER_BASE + ((x) >> 2) * 0x10)