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