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

SA1100 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-sa1100/assabet.c
arch/arm/mach-sa1100/badge4.c
arch/arm/mach-sa1100/cerf.c
arch/arm/mach-sa1100/collie.c
arch/arm/mach-sa1100/generic.c
arch/arm/mach-sa1100/h3600.c
arch/arm/mach-sa1100/hackkit.c
arch/arm/mach-sa1100/jornada720.c
arch/arm/mach-sa1100/lart.c
arch/arm/mach-sa1100/neponset.c
arch/arm/mach-sa1100/simpad.c

index 24687f511bf53c9bf74ee4d55a332a61a690f162..75efb5da5b6d2874867cd83c58fd37b82e456bde 100644 (file)
@@ -388,9 +388,17 @@ static struct sa1100_port_fns assabet_port_fns __initdata = {
 };
 
 static struct map_desc assabet_io_desc[] __initdata = {
- /* virtual     physical    length      type */
-  { 0xf1000000, 0x12000000, 0x00100000, MT_DEVICE }, /* Board Control Register */
-  { 0xf2800000, 0x4b800000, 0x00800000, MT_DEVICE }  /* MQ200 */
+       {       /* Board Control Register */
+               .virtual        =  0xf1000000,
+               .pfn            = __phys_to_pfn(0x12000000),
+               .length         = 0x00100000,
+               .type           = MT_DEVICE
+       }, {    /* MQ200 */
+               .virtual        =  0xf2800000,
+               .pfn            = __phys_to_pfn(0x4b800000),
+               .length         = 0x00800000,
+               .type           = MT_DEVICE
+       }
 };
 
 static void __init assabet_map_io(void)
index b6169cb091967d62c9c4b55920af89b2b51d4a84..c92cebff7f8e758b653b053c612b82cb8041ba92 100644 (file)
@@ -254,10 +254,22 @@ EXPORT_SYMBOL(badge4_set_5V);
 
 
 static struct map_desc badge4_io_desc[] __initdata = {
-  /*  virtual    physical    length    type */
-  {0xf1000000, 0x08000000, 0x00100000, MT_DEVICE },/* SRAM  bank 1 */
-  {0xf2000000, 0x10000000, 0x00100000, MT_DEVICE },/* SRAM  bank 2 */
-  {0xf4000000, 0x48000000, 0x00100000, MT_DEVICE } /* SA-1111      */
+       {       /* SRAM  bank 1 */
+               .virtual        = 0xf1000000,
+               .pfn            = __phys_to_pfn(0x08000000),
+               .length         = 0x00100000,
+               .type           = MT_DEVICE
+       }, {    /* SRAM  bank 2 */
+               .virtual        = 0xf2000000,
+               .pfn            = __phys_to_pfn(0x10000000),
+               .length         = 0x00100000,
+               .type           = MT_DEVICE
+       }, {    /* SA-1111      */
+               .virtual        = 0xf4000000,
+               .pfn            = __phys_to_pfn(0x48000000),
+               .length         = 0x00100000,
+               .type           = MT_DEVICE
+       }
 };
 
 static void
index 9484be7dc671a0ada6bb834ea480b48b73ff6863..23cb748852751db95f0437e97c4052f2dd1865c4 100644 (file)
@@ -100,8 +100,12 @@ static void __init cerf_init_irq(void)
 }
 
 static struct map_desc cerf_io_desc[] __initdata = {
-  /* virtual    physical    length      type */
-  { 0xf0000000, 0x08000000, 0x00100000, MT_DEVICE }  /* Crystal Ethernet Chip */
+       {       /* Crystal Ethernet Chip */
+               .virtual        =  0xf0000000,
+               .pfn            = __phys_to_pfn(0x08000000),
+               .length         = 0x00100000,
+               .type           = MT_DEVICE
+       }
 };
 
 static void __init cerf_map_io(void)
index 6ecab7e2c238789ee59f72830a495b68e13253ae..7fd6e29c36b79d6fb1cc7091695a6c5a4b56771a 100644 (file)
@@ -171,9 +171,17 @@ static void __init collie_init(void)
 }
 
 static struct map_desc collie_io_desc[] __initdata = {
-       /* virtual     physical    length      type */
-       {0xe8000000, 0x00000000, 0x02000000, MT_DEVICE},        /* 32M main flash (cs0) */
-       {0xea000000, 0x08000000, 0x02000000, MT_DEVICE},        /* 32M boot flash (cs1) */
+       {       /* 32M main flash (cs0) */
+               .virtual        = 0xe8000000,
+               .pfn            = __phys_to_pfn(0x00000000),
+               .length         = 0x02000000,
+               .type           = MT_DEVICE
+       }, {    /* 32M boot flash (cs1) */
+               .virtual        = 0xea000000,
+               .pfn            = __phys_to_pfn(0x08000000),
+               .length         = 0x02000000,
+               .type           = MT_DEVICE
+       }
 };
 
 static void __init collie_map_io(void)
index 3f1e358455e51578ca01f16d6cde1a3141fbfb50..93619497779cf46ec4992e454368bb365b1c56ec 100644 (file)
@@ -369,11 +369,27 @@ EXPORT_SYMBOL(sa1100fb_lcd_power);
  */
 
 static struct map_desc standard_io_desc[] __initdata = {
- /* virtual     physical    length      type */
-  { 0xf8000000, 0x80000000, 0x00100000, MT_DEVICE }, /* PCM */
-  { 0xfa000000, 0x90000000, 0x00100000, MT_DEVICE }, /* SCM */
-  { 0xfc000000, 0xa0000000, 0x00100000, MT_DEVICE }, /* MER */
-  { 0xfe000000, 0xb0000000, 0x00200000, MT_DEVICE }  /* LCD + DMA */
+       {       /* PCM */
+               .virtual        =  0xf8000000,
+               .pfn            = __phys_to_pfn(0x80000000),
+               .length         = 0x00100000,
+               .type           = MT_DEVICE
+       }, {    /* SCM */
+               .virtual        =  0xfa000000,
+               .pfn            = __phys_to_pfn(0x90000000),
+               .length         = 0x00100000,
+               .type           = MT_DEVICE
+       }, {    /* MER */
+               .virtual        =  0xfc000000,
+               .pfn            = __phys_to_pfn(0xa0000000),
+               .length         = 0x00100000,
+               .type           = MT_DEVICE
+       }, {    /* LCD + DMA */
+               .virtual        =  0xfe000000,
+               .pfn            = __phys_to_pfn(0xb0000000),
+               .length         = 0x00200000,
+               .type           = MT_DEVICE
+       },
 };
 
 void __init sa1100_map_io(void)
index e7aa2681ca6419a13255939bfa52beb3a65eaf72..e8352b7f74b04df8b02ca55900979e864a9e1d0e 100644 (file)
@@ -223,10 +223,22 @@ static void h3xxx_lcd_power(int enable)
 }
 
 static struct map_desc h3600_io_desc[] __initdata = {
- /* virtual           physical           length      type */
-  { H3600_BANK_2_VIRT, SA1100_CS2_PHYS,   0x02800000, MT_DEVICE }, /* static memory bank 2  CS#2 */
-  { H3600_BANK_4_VIRT, SA1100_CS4_PHYS,   0x00800000, MT_DEVICE }, /* static memory bank 4  CS#4 */
-  { H3600_EGPIO_VIRT,  H3600_EGPIO_PHYS,  0x01000000, MT_DEVICE }, /* EGPIO 0          CS#5 */
+       {       /* static memory bank 2  CS#2 */
+               .virtual        =  H3600_BANK_2_VIRT,
+               .pfn            = __phys_to_pfn(SA1100_CS2_PHYS),
+               .length         = 0x02800000,
+               .type           = MT_DEVICE
+       }, {    /* static memory bank 4  CS#4 */
+               .virtual        =  H3600_BANK_4_VIRT,
+               .pfn            = __phys_to_pfn(SA1100_CS4_PHYS),
+               .length         = 0x00800000,
+               .type           = MT_DEVICE
+       }, {    /* EGPIO 0              CS#5 */
+               .virtual        =  H3600_EGPIO_VIRT,
+               .pfn            = __phys_to_pfn(H3600_EGPIO_PHYS),
+               .length         = 0x01000000,
+               .type           = MT_DEVICE
+       }
 };
 
 /*
index 502d65cfe6543ba375ec4e6cf0386cfb0678a521..c922e043c4246166e01fca70bc1291fa345a7eb2 100644 (file)
@@ -57,8 +57,12 @@ static void hackkit_uart_pm(struct uart_port *port, u_int state, u_int oldstate)
  */
 
 static struct map_desc hackkit_io_desc[] __initdata = {
- /* virtual     physical    length      type */
-  { 0xe8000000, 0x00000000, 0x01000000, MT_DEVICE } /* Flash bank 0 */
+       {       /* Flash bank 0 */
+               .virtual        =  0xe8000000,
+               .pfn            = __phys_to_pfn(0x00000000),
+               .length         = 0x01000000,
+               .type           = MT_DEVICE
+       },
 };
 
 static struct sa1100_port_fns hackkit_port_fns __initdata = {
index 2f497112c96a176c0d72b90095c66ffb1d0b5536..9c363bfcf31077aa035e43fce6fcfac082032ca9 100644 (file)
@@ -81,10 +81,22 @@ static int __init jornada720_init(void)
 arch_initcall(jornada720_init);
 
 static struct map_desc jornada720_io_desc[] __initdata = {
- /* virtual     physical    length      type */
-  { 0xf0000000, 0x48000000, 0x00100000, MT_DEVICE }, /* Epson registers */
-  { 0xf1000000, 0x48200000, 0x00100000, MT_DEVICE }, /* Epson frame buffer */
-  { 0xf4000000, 0x40000000, 0x00100000, MT_DEVICE }  /* SA-1111 */
+       {       /* Epson registers */
+               .virtual        =  0xf0000000,
+               .pfn            = __phys_to_pfn(0x48000000),
+               .length         = 0x00100000,
+               .type           = MT_DEVICE
+       }, {    /* Epson frame buffer */
+               .virtual        =  0xf1000000,
+               .pfn            = __phys_to_pfn(0x48200000),
+               .length         = 0x00100000,
+               .type           = MT_DEVICE
+       }, {    /* SA-1111 */
+               .virtual        =  0xf4000000,
+               .pfn            = __phys_to_pfn(0x40000000),
+               .length         = 0x00100000,
+               .type           = MT_DEVICE
+       }
 };
 
 static void __init jornada720_map_io(void)
index ed6744d480aff0f04e2b1bd6a1f742b1e01d3b23..8c9e3dd5294269ce89084f0384055292eda9fe20 100644 (file)
@@ -31,9 +31,17 @@ static void __init lart_init(void)
 }
 
 static struct map_desc lart_io_desc[] __initdata = {
- /* virtual     physical    length      type */
-  { 0xe8000000, 0x00000000, 0x00400000, MT_DEVICE }, /* main flash memory */
-  { 0xec000000, 0x08000000, 0x00400000, MT_DEVICE }  /* main flash, alternative location */
+       {       /* main flash memory */
+               .virtual        =  0xe8000000,
+               .pfn            = __phys_to_pfn(0x00000000),
+               .length         = 0x00400000,
+               .type           = MT_DEVICE
+       }, {    /* main flash, alternative location */
+               .virtual        =  0xec000000,
+               .pfn            = __phys_to_pfn(0x08000000),
+               .length         = 0x00400000,
+               .type           = MT_DEVICE
+       }
 };
 
 static void __init lart_map_io(void)
index fc061641b7be083cb44d89e33fa22c3826e9c272..0c5eff3bdc09c14996a1c7c309de59cb31314425 100644 (file)
@@ -331,9 +331,17 @@ static int __init neponset_init(void)
 subsys_initcall(neponset_init);
 
 static struct map_desc neponset_io_desc[] __initdata = {
- /* virtual     physical    length type */
-  { 0xf3000000, 0x10000000, SZ_1M, MT_DEVICE }, /* System Registers */
-  { 0xf4000000, 0x40000000, SZ_1M, MT_DEVICE }  /* SA-1111 */
+       {       /* System Registers */
+               .virtual        =  0xf3000000,
+               .pfn            = __phys_to_pfn(0x10000000),
+               .length         = SZ_1M,
+               .type           = MT_DEVICE
+       }, {    /* SA-1111 */
+               .virtual        =  0xf4000000,
+               .pfn            = __phys_to_pfn(0x40000000),
+               .length         = SZ_1M,
+               .type           = MT_DEVICE
+       }
 };
 
 void __init neponset_map_io(void)
index 07f6d5fd7bb0a0108f149d8323073012dfe0a9d2..cfb6658e5cdf5fac50e4d9256947d47268483f02 100644 (file)
@@ -60,11 +60,17 @@ EXPORT_SYMBOL(set_cs3_bit);
 EXPORT_SYMBOL(clear_cs3_bit);
 
 static struct map_desc simpad_io_desc[] __initdata = {
-        /* virtual     physical    length      type */
-       /* MQ200 */
-       { 0xf2800000, 0x4b800000, 0x00800000, MT_DEVICE },
-       /* Paules CS3, write only */
-       { 0xf1000000, 0x18000000, 0x00100000, MT_DEVICE },
+       {       /* MQ200 */
+               .virtual        =  0xf2800000,
+               .pfn            = __phys_to_pfn(0x4b800000),
+               .length         = 0x00800000,
+               .type           = MT_DEVICE
+       }, {    /* Paules CS3, write only */
+               .virtual        =  0xf1000000,
+               .pfn            = __phys_to_pfn(0x18000000),
+               .length         = 0x00100000,
+               .type           = MT_DEVICE
+       },
 };