210-wn802t_support.patch 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. --- a/arch/arm/mach-orion5x/Kconfig
  2. +++ b/arch/arm/mach-orion5x/Kconfig
  3. @@ -144,10 +144,13 @@ config MACH_MSS2_DT
  4. Maxtor Shared Storage II platform.
  5. config MACH_WNR854T
  6. - bool "Netgear WNR854T"
  7. + bool "Netgear WNR854T / WN802T"
  8. help
  9. Say 'Y' here if you want your kernel to support the
  10. - Netgear WNR854T platform.
  11. + Netgear WNR854T or WN802T platform.
  12. +
  13. +config MACH_WN802T
  14. + def_bool MACH_WNR854T
  15. config MACH_RD88F5181L_GE
  16. bool "Marvell Orion-VoIP GE Reference Design"
  17. --- a/arch/arm/mach-orion5x/wnr854t-setup.c
  18. +++ b/arch/arm/mach-orion5x/wnr854t-setup.c
  19. @@ -115,6 +115,15 @@ static struct dsa_platform_data wnr854t_
  20. .chip = &wnr854t_switch_chip_data,
  21. };
  22. +static struct dsa_chip_data wn802t_switch_chip_data = {
  23. + .port_names[2] = "wan",
  24. + .port_names[3] = "cpu",
  25. +};
  26. +
  27. +static struct dsa_platform_data wn802t_switch_plat_data = {
  28. + .nr_chips = 1,
  29. + .chip = &wn802t_switch_chip_data,
  30. +};
  31. static void __init wnr854t_init(void)
  32. {
  33. /*
  34. @@ -128,7 +137,12 @@ static void __init wnr854t_init(void)
  35. * Configure peripherals.
  36. */
  37. orion5x_eth_init(&wnr854t_eth_data);
  38. - orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ);
  39. +
  40. + if (machine_is_wn802t())
  41. + orion5x_eth_switch_init(&wn802t_switch_plat_data, NO_IRQ);
  42. + else
  43. + orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ);
  44. +
  45. orion5x_uart0_init();
  46. mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET,
  47. @@ -168,7 +182,7 @@ static struct hw_pci wnr854t_pci __initd
  48. static int __init wnr854t_pci_init(void)
  49. {
  50. - if (machine_is_wnr854t())
  51. + if (machine_is_wnr854t() || machine_is_wn802t())
  52. pci_common_init(&wnr854t_pci);
  53. return 0;
  54. @@ -179,6 +193,18 @@ MACHINE_START(WNR854T, "Netgear WNR854T"
  55. /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
  56. .atag_offset = 0x100,
  57. .init_machine = wnr854t_init,
  58. + .map_io = orion5x_map_io,
  59. + .init_early = orion5x_init_early,
  60. + .init_irq = orion5x_init_irq,
  61. + .init_time = orion5x_timer_init,
  62. + .fixup = tag_fixup_mem32,
  63. + .restart = orion5x_restart,
  64. +MACHINE_END
  65. +
  66. +MACHINE_START(WN802T, "Netgear WN802T")
  67. + /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
  68. + .atag_offset = 0x100,
  69. + .init_machine = wnr854t_init,
  70. .map_io = orion5x_map_io,
  71. .init_early = orion5x_init_early,
  72. .init_irq = orion5x_init_irq,