]> git.karo-electronics.de Git - linux-beck.git/blobdiff - arch/arm/mach-omap2/io.c
ARM: DRA7: Provide proper IO map table
[linux-beck.git] / arch / arm / mach-omap2 / io.c
index 820dde8b5b0453f96a6a3c53a4db8e4c3c9abca6..c10fb291b99f81fdb30cc1ce1322f66abc28b122 100644 (file)
@@ -236,7 +236,7 @@ static struct map_desc omap44xx_io_desc[] __initdata = {
 };
 #endif
 
-#if defined(CONFIG_SOC_OMAP5) || defined(CONFIG_SOC_DRA7XX)
+#ifdef CONFIG_SOC_OMAP5
 static struct map_desc omap54xx_io_desc[] __initdata = {
        {
                .virtual        = L3_54XX_VIRT,
@@ -265,6 +265,53 @@ static struct map_desc omap54xx_io_desc[] __initdata = {
 };
 #endif
 
+#ifdef CONFIG_SOC_DRA7XX
+static struct map_desc dra7xx_io_desc[] __initdata = {
+       {
+               .virtual        = L4_CFG_MPU_DRA7XX_VIRT,
+               .pfn            = __phys_to_pfn(L4_CFG_MPU_DRA7XX_PHYS),
+               .length         = L4_CFG_MPU_DRA7XX_SIZE,
+               .type           = MT_DEVICE,
+       },
+       {
+               .virtual        = L3_MAIN_SN_DRA7XX_VIRT,
+               .pfn            = __phys_to_pfn(L3_MAIN_SN_DRA7XX_PHYS),
+               .length         = L3_MAIN_SN_DRA7XX_SIZE,
+               .type           = MT_DEVICE,
+       },
+       {
+               .virtual        = L4_PER1_DRA7XX_VIRT,
+               .pfn            = __phys_to_pfn(L4_PER1_DRA7XX_PHYS),
+               .length         = L4_PER1_DRA7XX_SIZE,
+               .type           = MT_DEVICE,
+       },
+       {
+               .virtual        = L4_PER2_DRA7XX_VIRT,
+               .pfn            = __phys_to_pfn(L4_PER2_DRA7XX_PHYS),
+               .length         = L4_PER2_DRA7XX_SIZE,
+               .type           = MT_DEVICE,
+       },
+       {
+               .virtual        = L4_PER3_DRA7XX_VIRT,
+               .pfn            = __phys_to_pfn(L4_PER3_DRA7XX_PHYS),
+               .length         = L4_PER3_DRA7XX_SIZE,
+               .type           = MT_DEVICE,
+       },
+       {
+               .virtual        = L4_CFG_DRA7XX_VIRT,
+               .pfn            = __phys_to_pfn(L4_CFG_DRA7XX_PHYS),
+               .length         = L4_CFG_DRA7XX_SIZE,
+               .type           = MT_DEVICE,
+       },
+       {
+               .virtual        = L4_WKUP_DRA7XX_VIRT,
+               .pfn            = __phys_to_pfn(L4_WKUP_DRA7XX_PHYS),
+               .length         = L4_WKUP_DRA7XX_SIZE,
+               .type           = MT_DEVICE,
+       },
+};
+#endif
+
 #ifdef CONFIG_SOC_OMAP2420
 void __init omap242x_map_io(void)
 {
@@ -309,12 +356,19 @@ void __init omap4_map_io(void)
 }
 #endif
 
-#if defined(CONFIG_SOC_OMAP5) ||  defined(CONFIG_SOC_DRA7XX)
+#ifdef CONFIG_SOC_OMAP5
 void __init omap5_map_io(void)
 {
        iotable_init(omap54xx_io_desc, ARRAY_SIZE(omap54xx_io_desc));
 }
 #endif
+
+#ifdef CONFIG_SOC_DRA7XX
+void __init dra7xx_map_io(void)
+{
+       iotable_init(dra7xx_io_desc, ARRAY_SIZE(dra7xx_io_desc));
+}
+#endif
 /*
  * omap2_init_reprogram_sdrc - reprogram SDRC timing parameters
  *