X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Farm%2Fmach-ixp4xx%2Fgtwx5715-setup.c;h=654e2eed81fb26d9b839dbcdbaa4c5e7eb6ed624;hb=689391210a4a8a1bf35119f87c51b3e01ef549e6;hp=333459d6aa464bb5394fd46783e9b6690b6ed4aa;hpb=ceeec3dc375e3b0618f16b34efc56fe093918f8b;p=linux-2.6-omap-h63xx.git diff --git a/arch/arm/mach-ixp4xx/gtwx5715-setup.c b/arch/arm/mach-ixp4xx/gtwx5715-setup.c index 333459d6aa4..654e2eed81f 100644 --- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c +++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -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, }, @@ -101,22 +102,14 @@ static struct platform_device gtwx5715_uart_device = { .resource = gtwx5715_uart_resources, }; - -void __init gtwx5715_map_io(void) -{ - ixp4xx_map_io(); -} - static struct flash_platform_data gtwx5715_flash_data = { .map_name = "cfi_probe", .width = 2, }; -static struct resource gtwx5715_flash_resource = { - .start = GTWX5715_FLASH_BASE, - .end = GTWX5715_FLASH_BASE + GTWX5715_FLASH_SIZE - 1, +static struct gtw5715_flash_resource = { .flags = IORESOURCE_MEM, -}; +} static struct platform_device gtwx5715_flash = { .name = "IXP4XX-Flash", @@ -135,16 +128,23 @@ static struct platform_device *gtwx5715_devices[] __initdata = { static void __init gtwx5715_init(void) { + ixp4xx_sys_init(); + + if (!flash_resource) + printk(KERN_ERR "Could not allocate flash resource\n"); + + 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 = gtwx5715_map_io, + .map_io = ixp4xx_map_io, .init_irq = ixp4xx_init_irq, .timer = &ixp4xx_timer, .boot_params = 0x0100,