ep93xx: add ethernet support for edb9302
PATCH 1/1 ep93xx: add ethernet support for edb9302
EDB9302 board use EP9302 controller, which include an ethernet device. Register the platform device to enable it.
Using edb9302a won't work for these boards because they do not include the chip ID. Ethernet wouldn't work without this patch and it seems there is no edb9302 board without ethernet. So, this is the correct fix.
--- arch/arm/mach-ep93xx/edb9302.c | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-)
arch/arm/mach-ep93xx/edb9302.c +30 -0
@@ -43,10 +43,40 @@ static struct platform_device edb9302_flash = { .resource = &edb9302_flash_resource, }; +static struct ep93xx_eth_data edb9302_eth_data = { + .phy_id =1 , +}; + +static struct resource edb9302_eth_resource[] = { + { + .start =EP93XX_ETHERNET_PHYS_BASE , + .end =EP93XX_ETHERNET_PHYS_BASE +0xffff , + .flags =IORESOURCE_MEM , + }, { + .start =IRQ_EP93XX_ETHERNET , + .end =IRQ_EP93XX_ETHERNET , + .flags =IORESOURCE_IRQ , + } +}; + +static struct platform_device edb9302_eth_device = { + .name ="ep93xx-eth" , + .id =-1 , + .dev = { + .platform_data = &edb9302_eth_data, + }, + .num_resources =2 , + .resource = edb9302_eth_resource, +}; +static void __init edb9302_init_machine (void ) {ep93xx_init_devices ();platform_device_register (&edb9302_flash); + +memcpy (edb9302_eth_data.dev_addr, + (void *)(EP93XX_ETHERNET_BASE +0x50 ),6 ); +platform_device_register (&edb9302_eth_device); }MACHINE_START (EDB9302 ,"Cirrus Logic EDB9302 Evaluation Board" )
Signature · 1 line
1.5.6.5
Quoted 9 lines · Thadeu Lima de Souza Cascardo
EDB9302 board use EP9302 controller, which include an ethernet device. Register the platform device to enable it.
Using
edb9302awon't work for these boards because they do not include the chip ID. Ethernet wouldn't work without this patch and it seems there is no edb9302 board without ethernet. So, this is the correct fix.--- arch/arm/mach-ep93xx/edb9302.c | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-)
Please submit to the ARM Linux patch tracker.