Commit 9ffbe873 authored by Imre Kaloz's avatar Imre Kaloz Committed by Nicolas Pitre

[ARM] orion5x: WNR854T switch support

This patch adds support for the switch found on the Netgear
WNR854T router.
Signed-off-by: default avatarImre Kaloz <kaloz@openwrt.org>
Signed-off-by: default avatarNicolas Pitre <nico@marvell.com>
parent 3b937a7d
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/mtd/physmap.h> #include <linux/mtd/physmap.h>
#include <linux/mv643xx_eth.h> #include <linux/mv643xx_eth.h>
#include <linux/ethtool.h> #include <linux/ethtool.h>
#include <net/dsa.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/gpio.h> #include <asm/gpio.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -97,6 +98,20 @@ static struct mv643xx_eth_platform_data wnr854t_eth_data = { ...@@ -97,6 +98,20 @@ static struct mv643xx_eth_platform_data wnr854t_eth_data = {
.duplex = DUPLEX_FULL, .duplex = DUPLEX_FULL,
}; };
static struct dsa_chip_data wnr854t_switch_chip_data = {
.port_names[0] = "lan3",
.port_names[1] = "lan4",
.port_names[2] = "wan",
.port_names[3] = "cpu",
.port_names[5] = "lan1",
.port_names[7] = "lan2",
};
static struct dsa_platform_data wnr854t_switch_plat_data = {
.nr_chips = 1,
.chip = &wnr854t_switch_chip_data,
};
static void __init wnr854t_init(void) static void __init wnr854t_init(void)
{ {
/* /*
...@@ -110,6 +125,7 @@ static void __init wnr854t_init(void) ...@@ -110,6 +125,7 @@ static void __init wnr854t_init(void)
* Configure peripherals. * Configure peripherals.
*/ */
orion5x_eth_init(&wnr854t_eth_data); orion5x_eth_init(&wnr854t_eth_data);
orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ);
orion5x_uart0_init(); orion5x_uart0_init();
orion5x_setup_dev_boot_win(WNR854T_NOR_BOOT_BASE, orion5x_setup_dev_boot_win(WNR854T_NOR_BOOT_BASE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment