311-gtwx5717_mac_plat_info.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c
  2. +++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
  3. @@ -28,6 +28,7 @@
  4. #include <linux/tty.h>
  5. #include <linux/serial_8250.h>
  6. #include <linux/spi/spi_gpio_old.h>
  7. +#include <linux/dma-mapping.h>
  8. #include <asm/types.h>
  9. #include <asm/setup.h>
  10. #include <asm/memory.h>
  11. @@ -178,10 +179,39 @@ static struct platform_device gtwx5715_s
  12. },
  13. };
  14. +static struct eth_plat_info gtwx5715_npeb_data = {
  15. + .phy = IXP4XX_ETH_PHY_MAX_ADDR,
  16. + .phy_mask = 0x1e, /* ports 1-4 of the KS8995 switch */
  17. + .rxq = 3,
  18. + .txreadyq = 20,
  19. +};
  20. +
  21. +static struct eth_plat_info gtwx5715_npec_data = {
  22. + .phy = 5, /* port 5 of the KS8995 switch */
  23. + .rxq = 4,
  24. + .txreadyq = 21,
  25. +};
  26. +
  27. +static struct platform_device gtwx5715_npeb_device = {
  28. + .name = "ixp4xx_eth",
  29. + .id = IXP4XX_ETH_NPEB,
  30. + .dev.platform_data = &gtwx5715_npeb_data,
  31. + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
  32. +};
  33. +
  34. +static struct platform_device gtwx5715_npec_device = {
  35. + .name = "ixp4xx_eth",
  36. + .id = IXP4XX_ETH_NPEC,
  37. + .dev.platform_data = &gtwx5715_npec_data,
  38. + .dev.coherent_dma_mask = DMA_BIT_MASK(32),
  39. +};
  40. +
  41. static struct platform_device *gtwx5715_devices[] __initdata = {
  42. &gtwx5715_uart_device,
  43. &gtwx5715_flash,
  44. &gtwx5715_spi_bus,
  45. + &gtwx5715_npeb_device,
  46. + &gtwx5715_npec_device,
  47. };
  48. static void __init gtwx5715_init(void)