summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-realview
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2008-12-01 15:54:59 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2008-12-01 15:54:59 +0100
commit0a5b2f6be708bb6a2388b9f188cf0c48a33b1d5f (patch)
tree401790191aa67d410c68faf89376b8654e0303b2 /arch/arm/mach-realview
parentRealView: Refactor the Ethernet device registration (diff)
downloadlinux-0a5b2f6be708bb6a2388b9f188cf0c48a33b1d5f.tar.xz
linux-0a5b2f6be708bb6a2388b9f188cf0c48a33b1d5f.zip
RealView: Allow the in-kernel smc911x.c driver on RealView
This patch adds smc911x.c device configuration to the RealView platforms. At some point it may be changed to the new smsc911x.c driver (once complete testing was done). Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm/mach-realview')
-rw-r--r--arch/arm/mach-realview/core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index d80208a1f1fe..86aa6d74126f 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -28,6 +28,7 @@
#include <linux/clocksource.h>
#include <linux/clockchips.h>
#include <linux/io.h>
+#include <linux/smc911x.h>
#include <asm/system.h>
#include <mach/hardware.h>
@@ -125,6 +126,12 @@ int realview_flash_register(struct resource *res, u32 num)
return platform_device_register(&realview_flash_device);
}
+static struct smc911x_platdata realview_smc911x_platdata = {
+ .flags = SMC911X_USE_32BIT,
+ .irq_flags = IRQF_SHARED,
+ .irq_polarity = 1,
+};
+
static struct platform_device realview_eth_device = {
.name = "smc911x",
.id = 0,
@@ -136,6 +143,8 @@ int realview_eth_register(const char *name, struct resource *res)
if (name)
realview_eth_device.name = name;
realview_eth_device.resource = res;
+ if (strcmp(realview_eth_device.name, "smc911x") == 0)
+ realview_eth_device.dev.platform_data = &realview_smc911x_platdata;
return platform_device_register(&realview_eth_device);
}