Merge ../linux-2.6
[pandora-kernel.git] / arch / arm / mach-ixp4xx / gtwx5715-setup.c
index 3fd92c5..30f1300 100644 (file)
@@ -27,6 +27,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>
@@ -93,7 +94,7 @@ static struct plat_serial8250_port gtwx5715_uart_platform_data[] = {
 
 static struct platform_device gtwx5715_uart_device = {
        .name           = "serial8250",
-       .id             = 0,
+       .id             = PLAT8250_DEV_PLATFORM,
        .dev                    = {
                .platform_data  = gtwx5715_uart_platform_data,
        },
@@ -107,8 +108,6 @@ static struct flash_platform_data gtwx5715_flash_data = {
 };
 
 static struct resource gtwx5715_flash_resource = {
-       .start          = GTWX5715_FLASH_BASE,
-       .end            = GTWX5715_FLASH_BASE + GTWX5715_FLASH_SIZE - 1,
        .flags          = IORESOURCE_MEM,
 };
 
@@ -129,13 +128,17 @@ static struct platform_device *gtwx5715_devices[] __initdata = {
 
 static void __init gtwx5715_init(void)
 {
+       ixp4xx_sys_init();
+
+       gtwx5715_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
+       gtwx5715_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_8M - 1;
+
        platform_add_devices(gtwx5715_devices, ARRAY_SIZE(gtwx5715_devices));
 }
 
 
 MACHINE_START(GTWX5715, "Gemtek GTWX5715 (Linksys WRV54G)")
        /* Maintainer: George Joseph */
-       .phys_ram       = PHYS_OFFSET,
        .phys_io        = IXP4XX_UART2_BASE_PHYS,
        .io_pg_offst    = ((IXP4XX_UART2_BASE_VIRT) >> 18) & 0xfffc,
        .map_io         = ixp4xx_map_io,