diff options
Diffstat (limited to 'arch/arm/mach-clps711x/cdb89712.c')
-rw-r--r-- | arch/arm/mach-clps711x/cdb89712.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/arch/arm/mach-clps711x/cdb89712.c b/arch/arm/mach-clps711x/cdb89712.c index d90d25c67ac2..235e6256775f 100644 --- a/arch/arm/mach-clps711x/cdb89712.c +++ b/arch/arm/mach-clps711x/cdb89712.c @@ -23,6 +23,8 @@ #include <linux/string.h> #include <linux/mm.h> #include <linux/io.h> +#include <linux/interrupt.h> +#include <linux/platform_device.h> #include <mach/hardware.h> #include <asm/pgtable.h> @@ -34,30 +36,26 @@ #include "common.h" -/* - * Map the CS89712 Ethernet port. That should be moved to the - * ethernet driver, perhaps. - */ -static struct map_desc cdb89712_io_desc[] __initdata = { - { - .virtual = IO_ADDRESS(ETHER_PHYS_BASE), - .pfn = __phys_to_pfn(ETHER_PHYS_BASE), - .length = ETHER_SIZE, - .type = MT_DEVICE - } +#define CDB89712_CS8900_BASE (CS2_PHYS_BASE + 0x300) +#define CDB89712_CS8900_IRQ (IRQ_EINT3) + +static struct resource cdb89712_cs8900_resource[] __initdata = { + DEFINE_RES_MEM(CDB89712_CS8900_BASE, SZ_1K), + DEFINE_RES_IRQ(CDB89712_CS8900_IRQ), }; -static void __init cdb89712_map_io(void) +static void __init cdb89712_init(void) { - clps711x_map_io(); - iotable_init(cdb89712_io_desc, ARRAY_SIZE(cdb89712_io_desc)); + platform_device_register_simple("cs89x0", 0, cdb89712_cs8900_resource, + ARRAY_SIZE(cdb89712_cs8900_resource)); } MACHINE_START(CDB89712, "Cirrus-CDB89712") /* Maintainer: Ray Lehtiniemi */ .atag_offset = 0x100, - .map_io = cdb89712_map_io, + .map_io = clps711x_map_io, .init_irq = clps711x_init_irq, .timer = &clps711x_timer, + .init_machine = cdb89712_init, .restart = clps711x_restart, MACHINE_END |