[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen/arm: implement smp initialization callbacks for omap5



commit 466abd6b3866cda0866c03a9d7673f299d6f6754
Author:     Chen Baozi <baozich@xxxxxxxxx>
AuthorDate: Tue Oct 15 16:45:31 2013 +0800
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Thu Oct 24 14:03:30 2013 +0100

    xen/arm: implement smp initialization callbacks for omap5
    
    Signed-off-by: Chen Baozi <baozich@xxxxxxxxx>
    Acked-by: Julien Grall <julien.grall@xxxxxxxxxx>
---
 xen/arch/arm/platforms/omap5.c        |   34 +++++++++++++++++++++++++++++++++
 xen/include/asm-arm/platforms/omap5.h |    3 ++
 2 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/xen/arch/arm/platforms/omap5.c b/xen/arch/arm/platforms/omap5.c
index a40d016..bd9db74 100644
--- a/xen/arch/arm/platforms/omap5.c
+++ b/xen/arch/arm/platforms/omap5.c
@@ -121,6 +121,38 @@ static int omap5_specific_mapping(struct domain *d)
     return 0;
 }
 
+static int __init omap5_smp_init(void)
+{
+    void __iomem *wugen_base;
+
+    wugen_base = ioremap_nocache(OMAP5_WKUPGEN_BASE, PAGE_SIZE);
+    if ( !wugen_base )
+    {
+        dprintk(XENLOG_ERR, "Unable to map omap5 MMIO\n");
+        return -EFAULT;
+    }
+
+    printk("Set AuxCoreBoot1 to %"PRIpaddr" (%p)\n",
+           __pa(init_secondary), init_secondary);
+    writel(__pa(init_secondary), wugen_base + OMAP_AUX_CORE_BOOT_1_OFFSET);
+
+    printk("Set AuxCoreBoot0 to 0x20\n");
+    writel(0x20, wugen_base + OMAP_AUX_CORE_BOOT_0_OFFSET);
+
+    iounmap(wugen_base);
+
+    return 0;
+}
+
+static int __init omap5_cpu_up(int cpu)
+{
+    /* Nothing to do here, the generic sev() will suffice to kick CPUs
+     * out of either the firmware or our own smp_up_cpu gate,
+     * depending on where they have ended up. */
+
+    return 0;
+}
+
 static uint32_t omap5_quirks(void)
 {
     return PLATFORM_QUIRK_DOM0_MAPPING_11;
@@ -136,6 +168,8 @@ PLATFORM_START(omap5, "TI OMAP5")
     .compatible = omap5_dt_compat,
     .init_time = omap5_init_time,
     .specific_mapping = omap5_specific_mapping,
+    .smp_init = omap5_smp_init,
+    .cpu_up = omap5_cpu_up,
     .quirks = omap5_quirks,
 PLATFORM_END
 
diff --git a/xen/include/asm-arm/platforms/omap5.h 
b/xen/include/asm-arm/platforms/omap5.h
index dd8c6ca..c559c84 100644
--- a/xen/include/asm-arm/platforms/omap5.h
+++ b/xen/include/asm-arm/platforms/omap5.h
@@ -17,6 +17,9 @@
 #define OMAP5_WKUPGEN_BASE                      0x48281000
 #define OMAP5_SRAM_PA                           0x40300000
 
+#define OMAP_AUX_CORE_BOOT_0_OFFSET             0x800
+#define OMAP_AUX_CORE_BOOT_1_OFFSET             0x804
+
 #endif /* __ASM_ARM_PLATFORMS_OMAP5_H */
 
 /*
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.