aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ep93xx/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ep93xx/core.c')
-rw-r--r--arch/arm/mach-ep93xx/core.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index d6967dedce5..52ee8aa046c 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -461,6 +461,41 @@ static struct platform_device ep93xx_ohci_device = {
461 .resource = ep93xx_ohci_resources, 461 .resource = ep93xx_ohci_resources,
462}; 462};
463 463
464static struct ep93xx_eth_data ep93xx_eth_data;
465
466static struct resource ep93xx_eth_resource[] = {
467 {
468 .start = EP93XX_ETHERNET_PHYS_BASE,
469 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
470 .flags = IORESOURCE_MEM,
471 }, {
472 .start = IRQ_EP93XX_ETHERNET,
473 .end = IRQ_EP93XX_ETHERNET,
474 .flags = IORESOURCE_IRQ,
475 }
476};
477
478static struct platform_device ep93xx_eth_device = {
479 .name = "ep93xx-eth",
480 .id = -1,
481 .dev = {
482 .platform_data = &ep93xx_eth_data,
483 },
484 .num_resources = ARRAY_SIZE(ep93xx_eth_resource),
485 .resource = ep93xx_eth_resource,
486};
487
488void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr)
489{
490 if (copy_addr) {
491 memcpy(data->dev_addr,
492 (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
493 }
494
495 ep93xx_eth_data = *data;
496 platform_device_register(&ep93xx_eth_device);
497}
498
464extern void ep93xx_gpio_init(void); 499extern void ep93xx_gpio_init(void);
465 500
466void __init ep93xx_init_devices(void) 501void __init ep93xx_init_devices(void)