diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2008-12-01 09:54:59 -0500 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2008-12-01 09:54:59 -0500 |
commit | 0a5b2f6be708bb6a2388b9f188cf0c48a33b1d5f (patch) | |
tree | 401790191aa67d410c68faf89376b8654e0303b2 /arch/arm/mach-realview | |
parent | 0a3813306f432e8925ff648c84bd488b840e5185 (diff) |
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.c | 9 |
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 @@ | |||
28 | #include <linux/clocksource.h> | 28 | #include <linux/clocksource.h> |
29 | #include <linux/clockchips.h> | 29 | #include <linux/clockchips.h> |
30 | #include <linux/io.h> | 30 | #include <linux/io.h> |
31 | #include <linux/smc911x.h> | ||
31 | 32 | ||
32 | #include <asm/system.h> | 33 | #include <asm/system.h> |
33 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
@@ -125,6 +126,12 @@ int realview_flash_register(struct resource *res, u32 num) | |||
125 | return platform_device_register(&realview_flash_device); | 126 | return platform_device_register(&realview_flash_device); |
126 | } | 127 | } |
127 | 128 | ||
129 | static struct smc911x_platdata realview_smc911x_platdata = { | ||
130 | .flags = SMC911X_USE_32BIT, | ||
131 | .irq_flags = IRQF_SHARED, | ||
132 | .irq_polarity = 1, | ||
133 | }; | ||
134 | |||
128 | static struct platform_device realview_eth_device = { | 135 | static struct platform_device realview_eth_device = { |
129 | .name = "smc911x", | 136 | .name = "smc911x", |
130 | .id = 0, | 137 | .id = 0, |
@@ -136,6 +143,8 @@ int realview_eth_register(const char *name, struct resource *res) | |||
136 | if (name) | 143 | if (name) |
137 | realview_eth_device.name = name; | 144 | realview_eth_device.name = name; |
138 | realview_eth_device.resource = res; | 145 | realview_eth_device.resource = res; |
146 | if (strcmp(realview_eth_device.name, "smc911x") == 0) | ||
147 | realview_eth_device.dev.platform_data = &realview_smc911x_platdata; | ||
139 | 148 | ||
140 | return platform_device_register(&realview_eth_device); | 149 | return platform_device_register(&realview_eth_device); |
141 | } | 150 | } |