xen/arm: Specific mapping for dom0 on OMAP5 platform
authorChen Baozi <baozich@gmail.com>
Thu, 15 Aug 2013 13:19:48 +0000 (21:19 +0800)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 22 Aug 2013 12:26:49 +0000 (13:26 +0100)
Signed-off-by: Chen Baozi <baozich@gmail.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/platforms/omap5.c
xen/include/asm-arm/platforms/omap5.h

index 402dddd6be603d1628d09ffebefaf75af6c261cf..c10cf000064b772aa1a006f69e64d7804c6d85b5 100644 (file)
@@ -17,6 +17,7 @@
  * GNU General Public License for more details.
  */
 
+#include <asm/p2m.h>
 #include <xen/config.h>
 #include <asm/platform.h>
 #include <asm/platforms/omap5.h>
@@ -96,6 +97,34 @@ static int omap5_init_time(void)
     return 0;
 }
 
+/* Additional mappings for dom0 (not in the DTS) */
+static int omap5_specific_mapping(struct domain *d)
+{
+    /* Map the PRM module */
+    map_mmio_regions(d, OMAP5_PRM_BASE, OMAP5_PRM_BASE + (PAGE_SIZE * 2) - 1,
+                     OMAP5_PRM_BASE);
+
+    /* Map the PRM_MPU */
+    map_mmio_regions(d, OMAP5_PRCM_MPU_BASE,
+                     OMAP5_PRCM_MPU_BASE + PAGE_SIZE - 1,
+                     OMAP5_PRCM_MPU_BASE);
+
+    /* Map the Wakeup Gen */
+    map_mmio_regions(d, OMAP5_WKUPGEN_BASE, OMAP5_WKUPGEN_BASE + PAGE_SIZE - 1,
+                     OMAP5_WKUPGEN_BASE);
+
+    /* Map the on-chip SRAM */
+    map_mmio_regions(d, OMAP5_SRAM_PA, OMAP5_SRAM_PA + (PAGE_SIZE * 32) - 1,
+                     OMAP5_SRAM_PA);
+
+    return 0;
+}
+
+static uint32_t omap5_quirks(void)
+{
+    return PLATFORM_QUIRK_DOM0_MAPPING_11;
+}
+
 static const char const *omap5_dt_compat[] __initdata =
 {
     "ti,omap5",
@@ -105,6 +134,8 @@ static const char const *omap5_dt_compat[] __initdata =
 PLATFORM_START(omap5, "TI OMAP5")
     .compatible = omap5_dt_compat,
     .init_time = omap5_init_time,
+    .specific_mapping = omap5_specific_mapping,
+    .quirks = omap5_quirks,
 PLATFORM_END
 
 /*
index 092f340fed4403f1b20bdca29e4a4e8d8263fefc..dd8c6ca733d30d4a1cc63f68f753cdddb88896d0 100644 (file)
 #define OMAP5_CM_CLKSEL_SYS                     0x10
 #define SYS_CLKSEL_MASK                         0xfffffff8
 
+#define OMAP5_PRCM_MPU_BASE                     0x48243000
+#define OMAP5_WKUPGEN_BASE                      0x48281000
+#define OMAP5_SRAM_PA                           0x40300000
+
 #endif /* __ASM_ARM_PLATFORMS_OMAP5_H */
 
 /*