diff options
Diffstat (limited to 'arch/arm/mach-clps711x/autcpu12.c')
-rw-r--r-- | arch/arm/mach-clps711x/autcpu12.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/arch/arm/mach-clps711x/autcpu12.c b/arch/arm/mach-clps711x/autcpu12.c index 214547b5c51f..d9b7f94a7ec9 100644 --- a/arch/arm/mach-clps711x/autcpu12.c +++ b/arch/arm/mach-clps711x/autcpu12.c @@ -24,6 +24,7 @@ #include <linux/mm.h> #include <linux/io.h> #include <linux/ioport.h> +#include <linux/interrupt.h> #include <linux/platform_device.h> #include <mach/hardware.h> @@ -39,21 +40,13 @@ #include "common.h" -static struct map_desc autcpu12_io_desc[] __initdata = { - /* Memory-mapped extra io and CS8900A Ethernet chip */ - { - .virtual = IO_ADDRESS(AUTCPU12_PHYS_CS8900A), - .pfn = __phys_to_pfn(AUTCPU12_PHYS_CS8900A), - .length = SZ_1M, - .type = MT_DEVICE - } -}; +#define AUTCPU12_CS8900_BASE (CS2_PHYS_BASE + 0x300) +#define AUTCPU12_CS8900_IRQ (IRQ_EINT3) -void __init autcpu12_map_io(void) -{ - clps711x_map_io(); - iotable_init(autcpu12_io_desc, ARRAY_SIZE(autcpu12_io_desc)); -} +static struct resource autcpu12_cs8900_resource[] __initdata = { + DEFINE_RES_MEM(AUTCPU12_CS8900_BASE, SZ_1K), + DEFINE_RES_IRQ(AUTCPU12_CS8900_IRQ), +}; static struct resource autcpu12_nvram_resource[] __initdata = { DEFINE_RES_MEM_NAMED(AUTCPU12_PHYS_NVRAM, SZ_128K, "SRAM"), @@ -68,16 +61,18 @@ static struct platform_device autcpu12_nvram_pdev __initdata = { static void __init autcpu12_init(void) { + platform_device_register_simple("cs89x0", 0, autcpu12_cs8900_resource, + ARRAY_SIZE(autcpu12_cs8900_resource)); platform_device_register(&autcpu12_nvram_pdev); } MACHINE_START(AUTCPU12, "autronix autcpu12") /* Maintainer: Thomas Gleixner */ .atag_offset = 0x20000, - .init_machine = autcpu12_init, - .map_io = autcpu12_map_io, + .map_io = clps711x_map_io, .init_irq = clps711x_init_irq, .timer = &clps711x_timer, + .init_machine = autcpu12_init, .restart = clps711x_restart, MACHINE_END |