summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
91f1cdc)
msleep(1) can sleep for up to 20ms.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30885
3c298f89-4303-0410-b956-
a3cf2f4a3e73
mutex_lock(&bus->mdio_lock);
bus->write(bus, 0x18, 0, page);
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);
lo = bus->read(bus, 0x10 | r2, r1);
hi = bus->read(bus, 0x10 | r2, r1 + 1);
mutex_lock(&bus->mdio_lock);
bus->write(bus, 0x18, 0, r3);
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);
bus->write(bus, 0x10 | r2, r1 + 1, hi);
bus->write(bus, 0x10 | r2, r1, lo);