]> git.sur5r.net Git - u-boot/blobdiff - drivers/net/phy/phy.c
imx: usb: ehci-mx6: wait_for_bit to check reg status
[u-boot] / drivers / net / phy / phy.c
index c8d08e8f4f1cbc793d73f6f09db5a55414cbcf32..65c731afb64ef7ab9eaa7247dab14feea872a989 100644 (file)
@@ -554,7 +554,7 @@ static struct phy_driver *get_phy_driver(struct phy_device *phydev,
 }
 
 static struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
-                                           int phy_id,
+                                           u32 phy_id,
                                            phy_interface_t interface)
 {
        struct phy_device *dev;
@@ -763,11 +763,13 @@ struct phy_device *phy_find_by_mask(struct mii_dev *bus, unsigned phy_mask,
                phy_interface_t interface)
 {
        /* Reset the bus */
-       if (bus->reset)
+       if (bus->reset) {
                bus->reset(bus);
 
-       /* Wait 15ms to make sure the PHY has come out of hard reset */
-       udelay(15000);
+               /* Wait 15ms to make sure the PHY has come out of hard reset */
+               udelay(15000);
+       }
+
        return get_phy_device_by_mask(bus, phy_mask, interface);
 }