[ARM] 2995/1: Replace map_desc.physical with map_desc.pfn: Versatile
authorDeepak Saxena <dsaxena@plexity.net>
Fri, 28 Oct 2005 14:19:06 +0000 (15:19 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 28 Oct 2005 14:19:06 +0000 (15:19 +0100)
Patch from Deepak Saxena

Versatile map_desc.pfn conversion

Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-versatile/core.c

index a30e045..7e4bdd0 100644 (file)
@@ -186,25 +186,82 @@ void __init versatile_init_irq(void)
 }
 
 static struct map_desc versatile_io_desc[] __initdata = {
- { IO_ADDRESS(VERSATILE_SYS_BASE),   VERSATILE_SYS_BASE,   SZ_4K,      MT_DEVICE },
- { IO_ADDRESS(VERSATILE_SIC_BASE),   VERSATILE_SIC_BASE,   SZ_4K,      MT_DEVICE },
- { IO_ADDRESS(VERSATILE_VIC_BASE),   VERSATILE_VIC_BASE,   SZ_4K,      MT_DEVICE },
- { IO_ADDRESS(VERSATILE_SCTL_BASE),  VERSATILE_SCTL_BASE,  SZ_4K * 9,  MT_DEVICE },
+       {
+               .virtual        =  IO_ADDRESS(VERSATILE_SYS_BASE),
+               .pfn            = __phys_to_pfn(VERSATILE_SYS_BASE),
+               .length         = SZ_4K,
+               .type           = MT_DEVICE
+       }, {
+               .virtual        =  IO_ADDRESS(VERSATILE_SIC_BASE),
+               .pfn            = __phys_to_pfn(VERSATILE_SIC_BASE),
+               .length         = SZ_4K,
+               .type           = MT_DEVICE
+       }, {
+               .virtual        =  IO_ADDRESS(VERSATILE_VIC_BASE),
+               .pfn            = __phys_to_pfn(VERSATILE_VIC_BASE),
+               .length         = SZ_4K,
+               .type           = MT_DEVICE
+       }, {
+               .virtual        =  IO_ADDRESS(VERSATILE_SCTL_BASE),
+               .pfn            = __phys_to_pfn(VERSATILE_SCTL_BASE),
+               .length         = SZ_4K * 9,
+               .type           = MT_DEVICE
+       },
 #ifdef CONFIG_MACH_VERSATILE_AB
- { IO_ADDRESS(VERSATILE_GPIO0_BASE), VERSATILE_GPIO0_BASE, SZ_4K,      MT_DEVICE },
- { IO_ADDRESS(VERSATILE_IB2_BASE),   VERSATILE_IB2_BASE,   SZ_64M,     MT_DEVICE },
+       {
+               .virtual        =  IO_ADDRESS(VERSATILE_GPIO0_BASE),
+               .pfn            = __phys_to_pfn(VERSATILE_GPIO0_BASE),
+               .length         = SZ_4K,
+               .type           = MT_DEVICE
+       }, {
+               .virtual        =  IO_ADDRESS(VERSATILE_IB2_BASE),
+               .pfn            = __phys_to_pfn(VERSATILE_IB2_BASE),
+               .length         = SZ_64M,
+               .type           = MT_DEVICE
+       },
 #endif
 #ifdef CONFIG_DEBUG_LL
- { IO_ADDRESS(VERSATILE_UART0_BASE), VERSATILE_UART0_BASE, SZ_4K,      MT_DEVICE },
+       {
+               .virtual        =  IO_ADDRESS(VERSATILE_UART0_BASE),
+               .pfn            = __phys_to_pfn(VERSATILE_UART0_BASE),
+               .length         = SZ_4K,
+               .type           = MT_DEVICE
+       },
 #endif
 #ifdef CONFIG_PCI
- { IO_ADDRESS(VERSATILE_PCI_CORE_BASE), VERSATILE_PCI_CORE_BASE, SZ_4K, MT_DEVICE },
- { VERSATILE_PCI_VIRT_BASE,          VERSATILE_PCI_BASE,   VERSATILE_PCI_BASE_SIZE, MT_DEVICE },
- { VERSATILE_PCI_CFG_VIRT_BASE,      VERSATILE_PCI_CFG_BASE, VERSATILE_PCI_CFG_BASE_SIZE, MT_DEVICE },
+       {
+               .virtual        =  IO_ADDRESS(VERSATILE_PCI_CORE_BASE),
+               .pfn            = __phys_to_pfn(VERSATILE_PCI_CORE_BASE),
+               .length         = SZ_4K,
+               .type           = MT_DEVICE
+       }, {
+               .virtual        =  VERSATILE_PCI_VIRT_BASE,
+               .pfn            = __phys_to_pfn(VERSATILE_PCI_BASE),
+               .length         = VERSATILE_PCI_BASE_SIZE,
+               .type           = MT_DEVICE
+       }, {
+               .virtual        =  VERSATILE_PCI_CFG_VIRT_BASE,
+               .pfn            = __phys_to_pfn(VERSATILE_PCI_CFG_BASE),
+               .length         = VERSATILE_PCI_CFG_BASE_SIZE,
+               .type           = MT_DEVICE
+       },
 #if 0
- { VERSATILE_PCI_VIRT_MEM_BASE0,     VERSATILE_PCI_MEM_BASE0, SZ_16M,  MT_DEVICE },
- { VERSATILE_PCI_VIRT_MEM_BASE1,     VERSATILE_PCI_MEM_BASE1, SZ_16M,  MT_DEVICE },
- { VERSATILE_PCI_VIRT_MEM_BASE2,     VERSATILE_PCI_MEM_BASE2, SZ_16M,  MT_DEVICE },
+       {
+               .virtual        =  VERSATILE_PCI_VIRT_MEM_BASE0,
+               .pfn            = __phys_to_pfn(VERSATILE_PCI_MEM_BASE0),
+               .length         = SZ_16M,
+               .type           = MT_DEVICE
+       }, {
+               .virtual        =  VERSATILE_PCI_VIRT_MEM_BASE1,
+               .pfn            = __phys_to_pfn(VERSATILE_PCI_MEM_BASE1),
+               .length         = SZ_16M,
+               .type           = MT_DEVICE
+       }, {
+               .virtual        =  VERSATILE_PCI_VIRT_MEM_BASE2,
+               .pfn            = __phys_to_pfn(VERSATILE_PCI_MEM_BASE2),
+               .length         = SZ_16M,
+               .type           = MT_DEVICE
+       },
 #endif
 #endif
 };