From 57e386ce9d136261bc60a5223f39b179a3c11046 Mon Sep 17 00:00:00 2001 From: Atsushi Nemoto Date: Tue, 1 May 2007 00:27:58 +0900 Subject: ne: MIPS: Use platform_driver for ne on RBTX49XX This patch lets RBTX49XX boards use generic platform_driver interface for the ne driver. * Use platform_device to pass ioaddr and irq to the ne driver. * Remove unnecessary ifdefs for RBTX49XX from the ne driver. * Make the ne driver selectable on these boards regardless of CONFIG_ISA Signed-off-by: Atsushi Nemoto Signed-off-by: Jeff Garzik --- .../tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'arch/mips/tx4927') diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c index 0f7576dfd141..a0c11efeaeeb 100644 --- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c +++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c @@ -1049,3 +1049,22 @@ static int __init toshiba_rbtx4927_rtc_init(void) return IS_ERR(dev) ? PTR_ERR(dev) : 0; } device_initcall(toshiba_rbtx4927_rtc_init); + +static int __init rbtx4927_ne_init(void) +{ + static struct resource __initdata res[] = { + { + .start = RBTX4927_RTL_8019_BASE, + .end = RBTX4927_RTL_8019_BASE + 0x20 - 1, + .flags = IORESOURCE_IO, + }, { + .start = RBTX4927_RTL_8019_IRQ, + .flags = IORESOURCE_IRQ, + } + }; + struct platform_device *dev = + platform_device_register_simple("ne", -1, + res, ARRAY_SIZE(res)); + return IS_ERR(dev) ? PTR_ERR(dev) : 0; +} +device_initcall(rbtx4927_ne_init); -- cgit v1.2.3-59-g8ed1b