diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2012-11-17 17:57:07 +0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-11-20 22:21:39 -0800 |
commit | 200daa367c59b4952f1e86ed9761859b1bcc3dbd (patch) | |
tree | 98856570c2886254b0ed18a4037097e00b86afab /arch/arm/mach-clps711x/cdb89712.c | |
parent | a93d620159524088d9633f60a8f746e3dd2e791e (diff) | |
download | lwn-200daa367c59b4952f1e86ed9761859b1bcc3dbd.tar.gz lwn-200daa367c59b4952f1e86ed9761859b1bcc3dbd.zip |
ARM: clps711x: Using platform_driver for ethernet device
This patch removes static mappings for ethernet devices. Now we will use
platform_driver for ethernet devices.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
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 |