100-wg302v2_gateway7001_mac_plat_info.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. --- a/arch/arm/mach-ixp4xx/gateway7001-setup.c
  2. +++ b/arch/arm/mach-ixp4xx/gateway7001-setup.c
  3. @@ -17,6 +17,7 @@
  4. #include <linux/serial.h>
  5. #include <linux/tty.h>
  6. #include <linux/serial_8250.h>
  7. +#include <linux/dma-mapping.h>
  8. #include <asm/types.h>
  9. #include <asm/setup.h>
  10. @@ -75,9 +76,37 @@ static struct platform_device gateway700
  11. .resource = &gateway7001_uart_resource,
  12. };
  13. +static struct eth_plat_info gateway7001_plat_eth[] = {
  14. + {
  15. + .phy = 1,
  16. + .rxq = 3,
  17. + .txreadyq = 20,
  18. + }, {
  19. + .phy = 2,
  20. + .rxq = 4,
  21. + .txreadyq = 21,
  22. + }
  23. +};
  24. +
  25. +static struct platform_device gateway7001_eth[] = {
  26. + {
  27. + .name = "ixp4xx_eth",
  28. + .id = IXP4XX_ETH_NPEB,
  29. + .dev.platform_data = gateway7001_plat_eth,
  30. + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
  31. + }, {
  32. + .name = "ixp4xx_eth",
  33. + .id = IXP4XX_ETH_NPEC,
  34. + .dev.platform_data = gateway7001_plat_eth + 1,
  35. + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
  36. + }
  37. +};
  38. +
  39. static struct platform_device *gateway7001_devices[] __initdata = {
  40. &gateway7001_flash,
  41. - &gateway7001_uart
  42. + &gateway7001_uart,
  43. + &gateway7001_eth[0],
  44. + &gateway7001_eth[1],
  45. };
  46. static void __init gateway7001_init(void)
  47. --- a/arch/arm/mach-ixp4xx/wg302v2-setup.c
  48. +++ b/arch/arm/mach-ixp4xx/wg302v2-setup.c
  49. @@ -76,9 +76,26 @@ static struct platform_device wg302v2_ua
  50. .resource = &wg302v2_uart_resource,
  51. };
  52. +static struct eth_plat_info wg302v2_plat_eth[] = {
  53. + {
  54. + .phy = 8,
  55. + .rxq = 3,
  56. + .txreadyq = 20,
  57. + }
  58. +};
  59. +
  60. +static struct platform_device wg302v2_eth[] = {
  61. + {
  62. + .name = "ixp4xx_eth",
  63. + .id = IXP4XX_ETH_NPEB,
  64. + .dev.platform_data = wg302v2_plat_eth,
  65. + }
  66. +};
  67. +
  68. static struct platform_device *wg302v2_devices[] __initdata = {
  69. &wg302v2_flash,
  70. &wg302v2_uart,
  71. + &wg302v2_eth[0],
  72. };
  73. static void __init wg302v2_init(void)