diff options
author | Lennert Buytenhek <buytenh@org.rmk.(none)> | 2006-09-29 16:17:36 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-09-30 06:30:45 -0400 |
commit | 730ee9f3594d8bcedb981dd184f310899fc931c6 (patch) | |
tree | ef2fca48cf2022971bd95a3cb253294253206cfc /arch/arm/mach-ep93xx/edb9315a.c | |
parent | 2552fc27ff79b10b9678d92bcaef21df38bb7bb6 (diff) |
[ARM] 3879/1: ep93xx: instantiate platform devices for ep93xx ethernet
Instantiate platform devices for the ep93xx ethernet driver in a
couple of ep93xx board support files.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ep93xx/edb9315a.c')
-rw-r--r-- | arch/arm/mach-ep93xx/edb9315a.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/edb9315a.c b/arch/arm/mach-ep93xx/edb9315a.c index bfefdaa8f794..fa958e9d6ddd 100644 --- a/arch/arm/mach-ep93xx/edb9315a.c +++ b/arch/arm/mach-ep93xx/edb9315a.c | |||
@@ -44,10 +44,40 @@ static struct platform_device edb9315a_flash = { | |||
44 | .resource = &edb9315a_flash_resource, | 44 | .resource = &edb9315a_flash_resource, |
45 | }; | 45 | }; |
46 | 46 | ||
47 | static struct ep93xx_eth_data edb9315a_eth_data = { | ||
48 | .phy_id = 1, | ||
49 | }; | ||
50 | |||
51 | static struct resource edb9315a_eth_resource[] = { | ||
52 | { | ||
53 | .start = EP93XX_ETHERNET_PHYS_BASE, | ||
54 | .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff, | ||
55 | .flags = IORESOURCE_MEM, | ||
56 | }, { | ||
57 | .start = IRQ_EP93XX_ETHERNET, | ||
58 | .end = IRQ_EP93XX_ETHERNET, | ||
59 | .flags = IORESOURCE_IRQ, | ||
60 | } | ||
61 | }; | ||
62 | |||
63 | static struct platform_device edb9315a_eth_device = { | ||
64 | .name = "ep93xx-eth", | ||
65 | .id = -1, | ||
66 | .dev = { | ||
67 | .platform_data = &edb9315a_eth_data, | ||
68 | }, | ||
69 | .num_resources = 2, | ||
70 | .resource = edb9315a_eth_resource, | ||
71 | }; | ||
72 | |||
47 | static void __init edb9315a_init_machine(void) | 73 | static void __init edb9315a_init_machine(void) |
48 | { | 74 | { |
49 | ep93xx_init_devices(); | 75 | ep93xx_init_devices(); |
50 | platform_device_register(&edb9315a_flash); | 76 | platform_device_register(&edb9315a_flash); |
77 | |||
78 | memcpy(edb9315a_eth_data.dev_addr, | ||
79 | (void *)(EP93XX_ETHERNET_BASE + 0x50), 6); | ||
80 | platform_device_register(&edb9315a_eth_device); | ||
51 | } | 81 | } |
52 | 82 | ||
53 | MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board") | 83 | MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board") |