generic: ar8216: use usleep_range in ar8216_mii_{read,write}
msleep(1) can sleep for up to 20ms. SVN-Revision: 30885
This commit is contained in:
parent
77d0a8ca85
commit
2149facb53
1 changed files with 2 additions and 2 deletions
|
@ -87,7 +87,7 @@ ar8216_mii_read(struct ar8216_priv *priv, int reg)
|
|||
mutex_lock(&bus->mdio_lock);
|
||||
|
||||
bus->write(bus, 0x18, 0, page);
|
||||
msleep(1); /* wait for the page switch to propagate */
|
||||
usleep_range(1000, 2000); /* wait for the page switch to propagate */
|
||||
lo = bus->read(bus, 0x10 | r2, r1);
|
||||
hi = bus->read(bus, 0x10 | r2, r1 + 1);
|
||||
|
||||
|
@ -111,7 +111,7 @@ ar8216_mii_write(struct ar8216_priv *priv, int reg, u32 val)
|
|||
mutex_lock(&bus->mdio_lock);
|
||||
|
||||
bus->write(bus, 0x18, 0, r3);
|
||||
msleep(1); /* wait for the page switch to propagate */
|
||||
usleep_range(1000, 2000); /* wait for the page switch to propagate */
|
||||
bus->write(bus, 0x10 | r2, r1 + 1, hi);
|
||||
bus->write(bus, 0x10 | r2, r1, lo);
|
||||
|
||||
|
|
Loading…
Reference in a new issue