[ARM] Fix some corner cases in new mm initialisation
[powerpc.git] / arch / arm / mach-iop3xx / iop331-setup.c
index 622e791..53f6061 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/init.h>
 #include <linux/major.h>
 #include <linux/fs.h>
-#include <linux/device.h>
+#include <linux/platform_device.h>
 #include <linux/serial.h>
 #include <linux/tty.h>
 #include <linux/serial_core.h>
  * Standard IO mapping for all IOP331 based systems
  */
 static struct map_desc iop331_std_desc[] __initdata = {
- /* virtual     physical      length      type */
-
- /* mem mapped registers */
- { IOP331_VIRT_MEM_BASE,  IOP331_PHYS_MEM_BASE,   0x00002000,  MT_DEVICE },
-
- /* PCI IO space */
- { IOP331_PCI_LOWER_IO_VA,  IOP331_PCI_LOWER_IO_PA,   IOP331_PCI_IO_WINDOW_SIZE,  MT_DEVICE }
+       {       /* mem mapped registers */
+               .virtual        = IOP331_VIRT_MEM_BASE,
+               .pfn            = __phys_to_pfn(IOP331_PHYS_MEM_BASE),
+               .length         = 0x00002000,
+               .type           = MT_DEVICE
+       }, {    /* PCI IO space */
+               .virtual        = IOP331_PCI_LOWER_IO_VA,
+               .pfn            = __phys_to_pfn(IOP331_PCI_LOWER_IO_PA),
+               .length         = IOP331_PCI_IO_WINDOW_SIZE,
+               .type           = MT_DEVICE
+       }
 };
 
 static struct uart_port iop331_serial_ports[] = {
@@ -148,26 +152,28 @@ extern void iq80332_map_io(void);
 
 #if defined(CONFIG_ARCH_IQ80331)
 MACHINE_START(IQ80331, "Intel IQ80331")
-    MAINTAINER("Intel Corp.")
-    BOOT_MEM(PHYS_OFFSET, 0xfefff000, 0xfffff000) // virtual, physical
-    //BOOT_MEM(PHYS_OFFSET, IOP331_UART0_VIRT, IOP331_UART0_PHYS)
-    MAPIO(iq80331_map_io)
-    INITIRQ(iop331_init_irq)
+       /* Maintainer: Intel Corp. */
+       .phys_ram       = PHYS_OFFSET,
+       .phys_io        = 0xfefff000,
+       .io_pg_offst    = ((0xfffff000) >> 18) & 0xfffc, // virtual, physical
+       .map_io         = iq80331_map_io,
+       .init_irq       = iop331_init_irq,
        .timer          = &iop331_timer,
-    BOOT_PARAMS(0x0100)
-       INIT_MACHINE(iop33x_init)
+       .boot_params    = 0x0100,
+       .init_machine   = iop33x_init,
 MACHINE_END
 
 #elif defined(CONFIG_MACH_IQ80332)
 MACHINE_START(IQ80332, "Intel IQ80332")
-    MAINTAINER("Intel Corp.")
-    BOOT_MEM(PHYS_OFFSET, 0xfefff000, 0xfffff000) // virtual, physical
-    //BOOT_MEM(PHYS_OFFSET, IOP331_UART0_VIRT, IOP331_UART0_PHYS)
-    MAPIO(iq80332_map_io)
-    INITIRQ(iop331_init_irq)
+       /* Maintainer: Intel Corp. */
+       .phys_ram       = PHYS_OFFSET,
+       .phys_io        = 0xfefff000,
+       .io_pg_offst    = ((0xfffff000) >> 18) & 0xfffc, // virtual, physical
+       .map_io         = iq80332_map_io,
+       .init_irq       = iop331_init_irq,
        .timer          = &iop331_timer,
-    BOOT_PARAMS(0x0100)
-       INIT_MACHINE(iop33x_init)
+       .boot_params    = 0x0100,
+       .init_machine   = iop33x_init,
 MACHINE_END
 
 #else