aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/momentum/ocelot_3/platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/momentum/ocelot_3/platform.c')
-rw-r--r--arch/mips/momentum/ocelot_3/platform.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/arch/mips/momentum/ocelot_3/platform.c b/arch/mips/momentum/ocelot_3/platform.c
index 57cfe5c6e4a..0ab8d231cf7 100644
--- a/arch/mips/momentum/ocelot_3/platform.c
+++ b/arch/mips/momentum/ocelot_3/platform.c
@@ -38,8 +38,6 @@ static struct platform_device mv643xx_eth_shared_device = {
38#define MV64x60_IRQ_ETH_1 49 38#define MV64x60_IRQ_ETH_1 49
39#define MV64x60_IRQ_ETH_2 50 39#define MV64x60_IRQ_ETH_2 50
40 40
41#ifdef CONFIG_MV643XX_ETH_0
42
43static struct resource mv64x60_eth0_resources[] = { 41static struct resource mv64x60_eth0_resources[] = {
44 [0] = { 42 [0] = {
45 .name = "eth0 irq", 43 .name = "eth0 irq",
@@ -72,9 +70,6 @@ static struct platform_device eth0_device = {
72 .platform_data = &eth0_pd, 70 .platform_data = &eth0_pd,
73 }, 71 },
74}; 72};
75#endif /* CONFIG_MV643XX_ETH_0 */
76
77#ifdef CONFIG_MV643XX_ETH_1
78 73
79static struct resource mv64x60_eth1_resources[] = { 74static struct resource mv64x60_eth1_resources[] = {
80 [0] = { 75 [0] = {
@@ -108,9 +103,6 @@ static struct platform_device eth1_device = {
108 .platform_data = &eth1_pd, 103 .platform_data = &eth1_pd,
109 }, 104 },
110}; 105};
111#endif /* CONFIG_MV643XX_ETH_1 */
112
113#ifdef CONFIG_MV643XX_ETH_2
114 106
115static struct resource mv64x60_eth2_resources[] = { 107static struct resource mv64x60_eth2_resources[] = {
116 [0] = { 108 [0] = {
@@ -136,19 +128,12 @@ static struct platform_device eth2_device = {
136 .platform_data = &eth2_pd, 128 .platform_data = &eth2_pd,
137 }, 129 },
138}; 130};
139#endif /* CONFIG_MV643XX_ETH_2 */
140 131
141static struct platform_device *mv643xx_eth_pd_devs[] __initdata = { 132static struct platform_device *mv643xx_eth_pd_devs[] __initdata = {
142 &mv643xx_eth_shared_device, 133 &mv643xx_eth_shared_device,
143#ifdef CONFIG_MV643XX_ETH_0
144 &eth0_device, 134 &eth0_device,
145#endif
146#ifdef CONFIG_MV643XX_ETH_1
147 &eth1_device, 135 &eth1_device,
148#endif
149#ifdef CONFIG_MV643XX_ETH_2
150 &eth2_device, 136 &eth2_device,
151#endif
152}; 137};
153 138
154static u8 __init exchange_bit(u8 val, u8 cs) 139static u8 __init exchange_bit(u8 val, u8 cs)
@@ -215,15 +200,9 @@ static int __init mv643xx_eth_add_pds(void)
215 int ret; 200 int ret;
216 201
217 get_mac(mac); 202 get_mac(mac);
218#ifdef CONFIG_MV643XX_ETH_0
219 eth_mac_add(eth1_mac_addr, mac, 0); 203 eth_mac_add(eth1_mac_addr, mac, 0);
220#endif
221#ifdef CONFIG_MV643XX_ETH_1
222 eth_mac_add(eth1_mac_addr, mac, 1); 204 eth_mac_add(eth1_mac_addr, mac, 1);
223#endif
224#ifdef CONFIG_MV643XX_ETH_2
225 eth_mac_add(eth2_mac_addr, mac, 2); 205 eth_mac_add(eth2_mac_addr, mac, 2);
226#endif
227 ret = platform_add_devices(mv643xx_eth_pd_devs, 206 ret = platform_add_devices(mv643xx_eth_pd_devs,
228 ARRAY_SIZE(mv643xx_eth_pd_devs)); 207 ARRAY_SIZE(mv643xx_eth_pd_devs));
229 208