aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-realview/core.c
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2008-12-01 14:54:58 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2008-12-01 14:54:58 +0000
commit0a3813306f432e8925ff648c84bd488b840e5185 (patch)
tree42583fc92c9fc2fc73599a74b80ea1359b9c5f86 /arch/arm/mach-realview/core.c
parent1bbdf637baa708a2f0f46ead56c6c618b7dad7a8 (diff)
RealView: Refactor the Ethernet device registration
This patch moves the Ethernet device registration from individual realview_*.c files to core.c. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm/mach-realview/core.c')
-rw-r--r--arch/arm/mach-realview/core.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index 65c39a73d1c..d80208a1f1f 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -125,6 +125,21 @@ int realview_flash_register(struct resource *res, u32 num)
return platform_device_register(&realview_flash_device);
}
+static struct platform_device realview_eth_device = {
+ .name = "smc911x",
+ .id = 0,
+ .num_resources = 2,
+};
+
+int realview_eth_register(const char *name, struct resource *res)
+{
+ if (name)
+ realview_eth_device.name = name;
+ realview_eth_device.resource = res;
+
+ return platform_device_register(&realview_eth_device);
+}
+
static struct resource realview_i2c_resource = {
.start = REALVIEW_I2C_BASE,
.end = REALVIEW_I2C_BASE + SZ_4K - 1,