]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ls1021a: adding a secondary core boot address and kick functions
authorXiubo Li <Li.Xiubo@freescale.com>
Fri, 21 Nov 2014 09:40:56 +0000 (17:40 +0800)
committerYork Sun <yorksun@freescale.com>
Thu, 11 Dec 2014 17:41:53 +0000 (09:41 -0800)
Define the board specific smp_set_cpu_boot_addr() function to set
the start address for secondary cores in the LS1021A specific manner.

Define the board specific smp_kick_all_cpus() functioin to boot a
secondary core. Here the BRR contains control bits for enabling boot
for each core. On exiting HRESET or PORESET, the RCW BOOT_HO field
optionally allows for logical core 0 to be released for booting or to
remain in boot holdoff. All other cores remain in boot holdoff until
their corresponding bit is set.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
arch/arm/cpu/armv7/ls102xa/cpu.c

index fae6c68efc4744af38c8a49d2029a4b3dbef2fe7..ce2d92f5a66c583a5d9eb219d1779befd93d10c4 100644 (file)
@@ -117,3 +117,21 @@ int arch_cpu_init(void)
 
        return 0;
 }
+
+#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
+/* Set the address at which the secondary core starts from.*/
+void smp_set_core_boot_addr(unsigned long addr, int corenr)
+{
+       struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
+
+       out_be32(&gur->scratchrw[0], addr);
+}
+
+/* Release the secondary core from holdoff state and kick it */
+void smp_kick_all_cpus(void)
+{
+       struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
+
+       out_be32(&gur->brrl, 0x2);
+}
+#endif