From: Chen Baozi <baozich@gmail.com>
To: Ian Campbell <Ian.Campbell@citrix.com>,
Julien Grall <julien.grall@linaro.org>
Cc: Chen Baozi <baozich@gmail.com>,
Xen Developer List <xen-devel@lists.xen.org>
Subject: [PATCH v2 1/3] xen/arm: Specific mapping for dom0 on OMAP5 platform
Date: Thu, 15 Aug 2013 21:19:48 +0800 [thread overview]
Message-ID: <1376572790-27724-2-git-send-email-baozich@gmail.com> (raw)
In-Reply-To: <1376572790-27724-1-git-send-email-baozich@gmail.com>
Signed-off-by: Chen Baozi <baozich@gmail.com>
---
xen/arch/arm/platforms/omap5.c | 31 +++++++++++++++++++++++++++++++
xen/include/asm-arm/platforms/omap5.h | 4 ++++
2 files changed, 35 insertions(+)
diff --git a/xen/arch/arm/platforms/omap5.c b/xen/arch/arm/platforms/omap5.c
index 402dddd..c10cf00 100644
--- a/xen/arch/arm/platforms/omap5.c
+++ b/xen/arch/arm/platforms/omap5.c
@@ -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
/*
diff --git a/xen/include/asm-arm/platforms/omap5.h b/xen/include/asm-arm/platforms/omap5.h
index 092f340..dd8c6ca 100644
--- a/xen/include/asm-arm/platforms/omap5.h
+++ b/xen/include/asm-arm/platforms/omap5.h
@@ -13,6 +13,10 @@
#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 */
/*
--
1.8.1.4
next prev parent reply other threads:[~2013-08-15 13:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-15 13:19 [PATCH v2 0/3] Specific mapping for dom0, smp kick cpus and hyp mode switch for OMAP5 Chen Baozi
2013-08-15 13:19 ` Chen Baozi [this message]
2013-08-22 10:21 ` [PATCH v2 1/3] xen/arm: Specific mapping for dom0 on OMAP5 platform Ian Campbell
2013-08-22 12:54 ` Ian Campbell
2013-08-23 0:04 ` Chen Baozi
2013-08-15 13:19 ` [PATCH v2 2/3] xen/arm: Support kick_cpus for OMAP5 Chen Baozi
2013-08-15 14:12 ` Andrii Anisov
2013-08-16 2:04 ` Chen Baozi
2013-08-15 13:19 ` [PATCH v2 3/3] xen/arm: Enable switch to hyp mode for OMAP5432 Chen Baozi
2013-08-15 14:09 ` Andrii Anisov
2013-08-15 14:25 ` Andrii Anisov
2013-08-15 14:27 ` Andrii Anisov
2013-08-15 14:51 ` Andrii Anisov
2013-08-15 14:37 ` Chen Baozi
2013-08-15 14:42 ` Andrii Anisov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1376572790-27724-2-git-send-email-baozich@gmail.com \
--to=baozich@gmail.com \
--cc=Ian.Campbell@citrix.com \
--cc=julien.grall@linaro.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).