f62b56944e5a6dcd4b752662ae7bf67e67e7ebfb
[openwrt.git] / target / linux / orion / patches / 020-wnr854t_switch_support.patch
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,20 @@ static struct mv643xx_eth_platform_data
12 .duplex = DUPLEX_FULL,
13 };
14
15 +static struct dsa_chip_data wnr854t_switch_chip_data = {
16 + .port_names[0] = "lan3",
17 + .port_names[1] = "lan4",
18 + .port_names[2] = "wan",
19 + .port_names[3] = "cpu",
20 + .port_names[5] = "lan1",
21 + .port_names[7] = "lan2",
22 +};
23 +
24 +static struct dsa_platform_data wnr854t_switch_plat_data = {
25 + .nr_chips = 1,
26 + .chip = &wnr854t_switch_chip_data,
27 +};
28 +
29 static void __init wnr854t_init(void)
30 {
31 /*
32 @@ -110,6 +125,7 @@ static void __init wnr854t_init(void)
33 * Configure peripherals.
34 */
35 orion5x_eth_init(&wnr854t_eth_data);
36 + orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ);
37 orion5x_uart0_init();
38
39 orion5x_setup_dev_boot_win(WNR854T_NOR_BOOT_BASE,
This page took 0.040147 seconds and 3 git commands to generate.