151-lanready_ap1000_mac_plat_info.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. --- a/arch/arm/mach-ixp4xx/ap1000-setup.c
  2. +++ b/arch/arm/mach-ixp4xx/ap1000-setup.c
  3. @@ -91,15 +91,45 @@ static struct platform_device ap1000_uar
  4. .resource = ap1000_uart_resources
  5. };
  6. +/* Built-in 10/100 Ethernet MAC interfaces */
  7. +static struct eth_plat_info ap1000_plat_eth[] = {
  8. + {
  9. + .phy = IXP4XX_ETH_PHY_MAX_ADDR,
  10. + .phy_mask = 0x1e,
  11. + .rxq = 3,
  12. + .txreadyq = 20,
  13. + }, {
  14. + .phy = 5,
  15. + .rxq = 4,
  16. + .txreadyq = 21,
  17. + }
  18. +};
  19. +
  20. +static struct platform_device ap1000_eth[] = {
  21. + {
  22. + .name = "ixp4xx_eth",
  23. + .id = IXP4XX_ETH_NPEB,
  24. + .dev.platform_data = ap1000_plat_eth,
  25. + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
  26. + }, {
  27. + .name = "ixp4xx_eth",
  28. + .id = IXP4XX_ETH_NPEC,
  29. + .dev.platform_data = ap1000_plat_eth + 1,
  30. + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
  31. + }
  32. +};
  33. +
  34. static struct platform_device *ap1000_devices[] __initdata = {
  35. &ap1000_flash,
  36. - &ap1000_uart
  37. + &ap1000_uart,
  38. + &ap1000_eth[0],
  39. + &ap1000_eth[1],
  40. };
  41. static char ap1000_mem_fixup[] __initdata = "mem=64M ";
  42. -static void __init ap1000_fixup(struct machine_desc *desc,
  43. - struct tag *tags, char **cmdline, struct meminfo *mi)
  44. +static void __init ap1000_fixup(struct tag *tags, char **cmdline,
  45. + struct meminfo *mi)
  46. {
  47. struct tag *t = tags;