Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[pandora-kernel.git] / arch / arm / mach-ixp4xx / coyote-setup.c
index 411ea99..13f8a7a 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/serial.h>
 #include <linux/tty.h>
 #include <linux/serial_8250.h>
+#include <linux/slab.h>
 
 #include <asm/types.h>
 #include <asm/setup.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 
-void __init coyote_map_io(void)
-{
-       ixp4xx_map_io();
-}
-
 static struct flash_platform_data coyote_flash_data = {
        .map_name       = "cfi_probe",
        .width          = 2,
 };
 
 static struct resource coyote_flash_resource = {
-       .start          = COYOTE_FLASH_BASE,
-       .end            = COYOTE_FLASH_BASE + COYOTE_FLASH_SIZE - 1,
        .flags          = IORESOURCE_MEM,
 };
 
@@ -71,7 +65,7 @@ static struct plat_serial8250_port coyote_uart_data[] = {
 
 static struct platform_device coyote_uart = {
        .name           = "serial8250",
-       .id             = 0,
+       .id             = PLAT8250_DEV_PLATFORM,
        .dev                    = {
                .platform_data  = coyote_uart_data,
        },
@@ -86,6 +80,11 @@ static struct platform_device *coyote_devices[] __initdata = {
 
 static void __init coyote_init(void)
 {
+       ixp4xx_sys_init();
+
+       coyote_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
+       coyote_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;
+
        *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
        *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
 
@@ -96,18 +95,15 @@ static void __init coyote_init(void)
                coyote_uart_data[0].irq = IRQ_IXP4XX_UART1;
        }
 
-
-       ixp4xx_sys_init();
        platform_add_devices(coyote_devices, ARRAY_SIZE(coyote_devices));
 }
 
 #ifdef CONFIG_ARCH_ADI_COYOTE
 MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote")
        /* Maintainer: MontaVista Software, Inc. */
-       .phys_ram       = PHYS_OFFSET,
        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS,
        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
-       .map_io         = coyote_map_io,
+       .map_io         = ixp4xx_map_io,
        .init_irq       = ixp4xx_init_irq,
        .timer          = &ixp4xx_timer,
        .boot_params    = 0x0100,
@@ -122,10 +118,9 @@ MACHINE_END
 #ifdef CONFIG_MACH_IXDPG425
 MACHINE_START(IXDPG425, "Intel IXDPG425")
        /* Maintainer: MontaVista Software, Inc. */
-       .phys_ram       = PHYS_OFFSET,
        .phys_io        = IXP4XX_PERIPHERAL_BASE_PHYS,
        .io_pg_offst    = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
-       .map_io         = coyote_map_io,
+       .map_io         = ixp4xx_map_io,
        .init_irq       = ixp4xx_init_irq,
        .timer          = &ixp4xx_timer,
        .boot_params    = 0x0100,