diff options
Diffstat (limited to 'drivers/net/fs_enet/mii-fec.c')
-rw-r--r-- | drivers/net/fs_enet/mii-fec.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c index 61aaae444b40..75a09994d665 100644 --- a/drivers/net/fs_enet/mii-fec.c +++ b/drivers/net/fs_enet/mii-fec.c | |||
@@ -100,23 +100,6 @@ static int fs_enet_fec_mii_reset(struct mii_bus *bus) | |||
100 | return 0; | 100 | return 0; |
101 | } | 101 | } |
102 | 102 | ||
103 | static void __devinit add_phy(struct mii_bus *bus, struct device_node *np) | ||
104 | { | ||
105 | const u32 *data; | ||
106 | int len, id, irq; | ||
107 | |||
108 | data = of_get_property(np, "reg", &len); | ||
109 | if (!data || len != 4) | ||
110 | return; | ||
111 | |||
112 | id = *data; | ||
113 | bus->phy_mask &= ~(1 << id); | ||
114 | |||
115 | irq = of_irq_to_resource(np, 0, NULL); | ||
116 | if (irq != NO_IRQ) | ||
117 | bus->irq[id] = irq; | ||
118 | } | ||
119 | |||
120 | static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, | 103 | static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, |
121 | const struct of_device_id *match) | 104 | const struct of_device_id *match) |
122 | { | 105 | { |
@@ -163,17 +146,10 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, | |||
163 | if (!new_bus->irq) | 146 | if (!new_bus->irq) |
164 | goto out_unmap_regs; | 147 | goto out_unmap_regs; |
165 | 148 | ||
166 | for (i = 0; i < PHY_MAX_ADDR; i++) | ||
167 | new_bus->irq[i] = -1; | ||
168 | |||
169 | while ((np = of_get_next_child(ofdev->node, np))) | ||
170 | if (!strcmp(np->type, "ethernet-phy")) | ||
171 | add_phy(new_bus, np); | ||
172 | |||
173 | new_bus->parent = &ofdev->dev; | 149 | new_bus->parent = &ofdev->dev; |
174 | dev_set_drvdata(&ofdev->dev, new_bus); | 150 | dev_set_drvdata(&ofdev->dev, new_bus); |
175 | 151 | ||
176 | ret = mdiobus_register(new_bus); | 152 | ret = of_mdiobus_register(new_bus, ofdev->node); |
177 | if (ret) | 153 | if (ret) |
178 | goto out_free_irqs; | 154 | goto out_free_irqs; |
179 | 155 | ||