Commit 37787e44 authored by Ronen Shitrit's avatar Ronen Shitrit Committed by Nicolas Pitre

[ARM] Kirkwood: properly handle the WAN port on newer RD88F6281 boards

On newer versions of the RD88F6281 board, the WAN port is connected to
its own ethernet port on the CPU, via a separate PHY, whereas on older
versions of the board, it is connected to one of the PHYs in the
ethernet switch.  In the RD8F6281 setup code, detect which version of
the board we are running on, and instantiate the ethernet ports and
switch driver accordingly.
Signed-off-by: default avatarRonen Shitrit <rshitrit@marvell.com>
Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
Signed-off-by: default avatarNicolas Pitre <nico@marvell.com>
parent d15fb9ef
...@@ -80,24 +80,38 @@ static struct dsa_platform_data rd88f6281_switch_data = { ...@@ -80,24 +80,38 @@ static struct dsa_platform_data rd88f6281_switch_data = {
.port_names[1] = "lan2", .port_names[1] = "lan2",
.port_names[2] = "lan3", .port_names[2] = "lan3",
.port_names[3] = "lan4", .port_names[3] = "lan4",
.port_names[4] = "wan",
.port_names[5] = "cpu", .port_names[5] = "cpu",
}; };
static struct mv643xx_eth_platform_data rd88f6281_ge01_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(11),
};
static struct mv_sata_platform_data rd88f6281_sata_data = { static struct mv_sata_platform_data rd88f6281_sata_data = {
.n_ports = 2, .n_ports = 2,
}; };
static void __init rd88f6281_init(void) static void __init rd88f6281_init(void)
{ {
u32 dev, rev;
/* /*
* Basic setup. Needs to be called early. * Basic setup. Needs to be called early.
*/ */
kirkwood_init(); kirkwood_init();
kirkwood_ehci_init(); kirkwood_ehci_init();
kirkwood_ge00_init(&rd88f6281_ge00_data); kirkwood_ge00_init(&rd88f6281_ge00_data);
kirkwood_pcie_id(&dev, &rev);
if (rev == MV88F6281_REV_A0) {
rd88f6281_switch_data.sw_addr = 10;
kirkwood_ge01_init(&rd88f6281_ge01_data);
} else {
rd88f6281_switch_data.port_names[4] = "wan";
}
kirkwood_ge00_switch_init(&rd88f6281_switch_data, NO_IRQ); kirkwood_ge00_switch_init(&rd88f6281_switch_data, NO_IRQ);
kirkwood_rtc_init(); kirkwood_rtc_init();
kirkwood_sata_init(&rd88f6281_sata_data); kirkwood_sata_init(&rd88f6281_sata_data);
kirkwood_uart0_init(); kirkwood_uart0_init();
......
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