From: Brandon Perez Subject: [PATCH RFC] DRA7: Add specific mappings for devices/regions not in the device tree. Date: Wed, 29 Jul 2015 16:30:46 -0400 Message-ID: <1438201846-17985-1-git-send-email-bperez-1@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZKY07-0007Ye-Bq for xen-devel@lists.xenproject.org; Wed, 29 Jul 2015 20:30:55 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Tim Deegan , Stefano Stabellini , Ian Campbell List-Id: xen-devel@lists.xenproject.org The DRA7 chip, which is similar to the OMAP5 chip, also requires specific mappings. These are MMIO mappings which are not explicitly stated in the device tree, so Xen does not know to map them. This patch adds these regions required by the DRA7 to be mapped. Signed-off-by: Brandon Perez --- xen/arch/arm/platforms/omap5.c | 27 +++++++++++++++++++++++++++ xen/include/asm-arm/platforms/omap5.h | 3 +++ 2 files changed, 30 insertions(+) diff --git a/xen/arch/arm/platforms/omap5.c b/xen/arch/arm/platforms/omap5.c index e7bf30d..3c6495a 100644 --- a/xen/arch/arm/platforms/omap5.c +++ b/xen/arch/arm/platforms/omap5.c @@ -120,6 +120,32 @@ static int omap5_specific_mapping(struct domain *d) return 0; } +/* Additional mappings for dom0 (not in the DTS) */ +static int dra7_specific_mapping(struct domain *d) +{ + /* Map the PRM module */ + map_mmio_regions(d, paddr_to_pfn(OMAP5_PRM_BASE), 2, + paddr_to_pfn(OMAP5_PRM_BASE)); + + /* Map the PRM_MPU */ + map_mmio_regions(d, paddr_to_pfn(OMAP5_PRCM_MPU_BASE), 1, + paddr_to_pfn(OMAP5_PRCM_MPU_BASE)); + + /* Map the Wakeup Gen */ + map_mmio_regions(d, paddr_to_pfn(OMAP5_WKUPGEN_BASE), 1, + paddr_to_pfn(OMAP5_WKUPGEN_BASE)); + + /* Map the on-chip SRAM */ + map_mmio_regions(d, paddr_to_pfn(OMAP5_SRAM_PA), 32, + paddr_to_pfn(OMAP5_SRAM_PA)); + + /* Map GPMC address space for NAND flash. */ + map_mmio_regions(d, paddr_to_pfn(OMAP5_GPMC_PA), 65536, + paddr_to_pfn(OMAP5_GPMC_PA)); + + return 0; +} + static int __init omap5_smp_init(void) { void __iomem *wugen_base; @@ -171,6 +197,7 @@ PLATFORM_START(dra7, "TI DRA7") .init_time = omap5_init_time, .cpu_up = cpu_up_send_sgi, .smp_init = omap5_smp_init, + .specific_mapping = dra7_specific_mapping, .dom0_gnttab_start = 0x4b000000, .dom0_gnttab_size = 0x20000, diff --git a/xen/include/asm-arm/platforms/omap5.h b/xen/include/asm-arm/platforms/omap5.h index c559c84..d87e7d2 100644 --- a/xen/include/asm-arm/platforms/omap5.h +++ b/xen/include/asm-arm/platforms/omap5.h @@ -20,6 +20,9 @@ #define OMAP_AUX_CORE_BOOT_0_OFFSET 0x800 #define OMAP_AUX_CORE_BOOT_1_OFFSET 0x804 +#define OMAP5_GPMC_PA 0x01000000 +#define OMAP5_TILER_PA 0x60000000 + #endif /* __ASM_ARM_PLATFORMS_OMAP5_H */ /* -- 1.7.9.5