diff options
Diffstat (limited to 'arch/arm/mach-kirkwood/rd88f6281-setup.c')
-rw-r--r-- | arch/arm/mach-kirkwood/rd88f6281-setup.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/arm/mach-kirkwood/rd88f6281-setup.c b/arch/arm/mach-kirkwood/rd88f6281-setup.c index 175054abd630..9a0e905d10cd 100644 --- a/arch/arm/mach-kirkwood/rd88f6281-setup.c +++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c | |||
@@ -80,24 +80,38 @@ static struct dsa_platform_data rd88f6281_switch_data = { | |||
80 | .port_names[1] = "lan2", | 80 | .port_names[1] = "lan2", |
81 | .port_names[2] = "lan3", | 81 | .port_names[2] = "lan3", |
82 | .port_names[3] = "lan4", | 82 | .port_names[3] = "lan4", |
83 | .port_names[4] = "wan", | ||
84 | .port_names[5] = "cpu", | 83 | .port_names[5] = "cpu", |
85 | }; | 84 | }; |
86 | 85 | ||
86 | static struct mv643xx_eth_platform_data rd88f6281_ge01_data = { | ||
87 | .phy_addr = MV643XX_ETH_PHY_ADDR(11), | ||
88 | }; | ||
89 | |||
87 | static struct mv_sata_platform_data rd88f6281_sata_data = { | 90 | static struct mv_sata_platform_data rd88f6281_sata_data = { |
88 | .n_ports = 2, | 91 | .n_ports = 2, |
89 | }; | 92 | }; |
90 | 93 | ||
91 | static void __init rd88f6281_init(void) | 94 | static void __init rd88f6281_init(void) |
92 | { | 95 | { |
96 | u32 dev, rev; | ||
97 | |||
93 | /* | 98 | /* |
94 | * Basic setup. Needs to be called early. | 99 | * Basic setup. Needs to be called early. |
95 | */ | 100 | */ |
96 | kirkwood_init(); | 101 | kirkwood_init(); |
97 | 102 | ||
98 | kirkwood_ehci_init(); | 103 | kirkwood_ehci_init(); |
104 | |||
99 | kirkwood_ge00_init(&rd88f6281_ge00_data); | 105 | kirkwood_ge00_init(&rd88f6281_ge00_data); |
106 | kirkwood_pcie_id(&dev, &rev); | ||
107 | if (rev == MV88F6281_REV_A0) { | ||
108 | rd88f6281_switch_data.sw_addr = 10; | ||
109 | kirkwood_ge01_init(&rd88f6281_ge01_data); | ||
110 | } else { | ||
111 | rd88f6281_switch_data.port_names[4] = "wan"; | ||
112 | } | ||
100 | kirkwood_ge00_switch_init(&rd88f6281_switch_data, NO_IRQ); | 113 | kirkwood_ge00_switch_init(&rd88f6281_switch_data, NO_IRQ); |
114 | |||
101 | kirkwood_rtc_init(); | 115 | kirkwood_rtc_init(); |
102 | kirkwood_sata_init(&rd88f6281_sata_data); | 116 | kirkwood_sata_init(&rd88f6281_sata_data); |
103 | kirkwood_uart0_init(); | 117 | kirkwood_uart0_init(); |