mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2025-01-09 05:40:39 +00:00
r6040: fix bad usage of udelay
This patch fixes the bad usage of udelay(5000), which in turns is a mdelay(5). It causes compilation for ARM where udelay maximum value is checked. Reported-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
parent
31b760202a
commit
c1d69937ee
@ -370,7 +370,7 @@ static void r6040_init_mac_regs(struct net_device *dev)
|
|||||||
/* Reset internal state machine */
|
/* Reset internal state machine */
|
||||||
iowrite16(2, ioaddr + MAC_SM);
|
iowrite16(2, ioaddr + MAC_SM);
|
||||||
iowrite16(0, ioaddr + MAC_SM);
|
iowrite16(0, ioaddr + MAC_SM);
|
||||||
udelay(5000);
|
mdelay(5);
|
||||||
|
|
||||||
/* MAC Bus Control Register */
|
/* MAC Bus Control Register */
|
||||||
iowrite16(MBCR_DEFAULT, ioaddr + MBCR);
|
iowrite16(MBCR_DEFAULT, ioaddr + MBCR);
|
||||||
@ -806,7 +806,7 @@ static void r6040_mac_address(struct net_device *dev)
|
|||||||
iowrite16(0x01, ioaddr + MCR1); /* Reset MAC */
|
iowrite16(0x01, ioaddr + MCR1); /* Reset MAC */
|
||||||
iowrite16(2, ioaddr + MAC_SM); /* Reset internal state machine */
|
iowrite16(2, ioaddr + MAC_SM); /* Reset internal state machine */
|
||||||
iowrite16(0, ioaddr + MAC_SM);
|
iowrite16(0, ioaddr + MAC_SM);
|
||||||
udelay(5000);
|
mdelay(5);
|
||||||
|
|
||||||
/* Restore MAC Address */
|
/* Restore MAC Address */
|
||||||
adrp = (u16 *) dev->dev_addr;
|
adrp = (u16 *) dev->dev_addr;
|
||||||
|
Loading…
Reference in New Issue
Block a user