020-wnr854t_switch_support.patch 928 B

12345678910111213141516171819202122232425262728293031323334
  1. --- a/arch/arm/mach-orion5x/wnr854t-setup.c
  2. +++ b/arch/arm/mach-orion5x/wnr854t-setup.c
  3. @@ -15,6 +15,7 @@
  4. #include <linux/mtd/physmap.h>
  5. #include <linux/mv643xx_eth.h>
  6. #include <linux/ethtool.h>
  7. +#include <net/dsa.h>
  8. #include <asm/mach-types.h>
  9. #include <asm/gpio.h>
  10. #include <asm/mach/arch.h>
  11. @@ -97,6 +98,15 @@ static struct mv643xx_eth_platform_data
  12. .duplex = DUPLEX_FULL,
  13. };
  14. +static struct dsa_platform_data wnr854t_switch_data = {
  15. + .port_names[0] = "lan3",
  16. + .port_names[1] = "lan4",
  17. + .port_names[2] = "wan",
  18. + .port_names[3] = "cpu",
  19. + .port_names[5] = "lan1",
  20. + .port_names[7] = "lan2",
  21. +};
  22. +
  23. static void __init wnr854t_init(void)
  24. {
  25. /*
  26. @@ -110,6 +120,7 @@ static void __init wnr854t_init(void)
  27. * Configure peripherals.
  28. */
  29. orion5x_eth_init(&wnr854t_eth_data);
  30. + orion5x_eth_switch_init(&wnr854t_switch_data, NO_IRQ);
  31. orion5x_uart0_init();
  32. orion5x_setup_dev_boot_win(WNR854T_NOR_BOOT_BASE,