aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/dec
diff options
context:
space:
mode:
authorfrançois romieu <romieu@fr.zoreil.com>2012-04-17 07:11:40 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-17 22:54:13 -0400
commit0c20494050a848af4479dbaa89e632a8c5903cf3 (patch)
treebd869102a3f5f6b071d097e756b5e0293572f61c /drivers/net/ethernet/dec
parent584c5e2ad3ada1a5ccfffa68347b79c3681cc36e (diff)
dmfe: enforce consistent timing delay.
The driver does not always use the same timing for what looks like the same operations. - DCR0 Use the same udelay everywhere for reset. Upper bound is 100 us. - DCR9 Use 5us delay for srom clock. 1us delay for phy_write_1bit (writes PHY_DATA_[01]) are not changed as they stay withing a 2,5MHz MDIO clock range. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Reviewed-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/dec')
-rw-r--r--drivers/net/ethernet/dec/tulip/dmfe.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/dec/tulip/dmfe.c b/drivers/net/ethernet/dec/tulip/dmfe.c
index 0ef5b68acd05..4d6fe604fa64 100644
--- a/drivers/net/ethernet/dec/tulip/dmfe.c
+++ b/drivers/net/ethernet/dec/tulip/dmfe.c
@@ -767,7 +767,7 @@ static int dmfe_stop(struct DEVICE *dev)
767 767
768 /* Reset & stop DM910X board */ 768 /* Reset & stop DM910X board */
769 dw32(DCR0, DM910X_RESET); 769 dw32(DCR0, DM910X_RESET);
770 udelay(5); 770 udelay(100);
771 phy_write(ioaddr, db->phy_addr, 0, 0x8000, db->chip_id); 771 phy_write(ioaddr, db->phy_addr, 0, 0x8000, db->chip_id);
772 772
773 /* free interrupt */ 773 /* free interrupt */
@@ -1601,7 +1601,9 @@ static u16 read_srom_word(void __iomem *ioaddr, int offset)
1601 int i; 1601 int i;
1602 1602
1603 dw32(DCR9, CR9_SROM_READ); 1603 dw32(DCR9, CR9_SROM_READ);
1604 udelay(5);
1604 dw32(DCR9, CR9_SROM_READ | CR9_SRCS); 1605 dw32(DCR9, CR9_SROM_READ | CR9_SRCS);
1606 udelay(5);
1605 1607
1606 /* Send the Read Command 110b */ 1608 /* Send the Read Command 110b */
1607 srom_clk_write(ioaddr, SROM_DATA_1); 1609 srom_clk_write(ioaddr, SROM_DATA_1);
@@ -1615,6 +1617,7 @@ static u16 read_srom_word(void __iomem *ioaddr, int offset)
1615 } 1617 }
1616 1618
1617 dw32(DCR9, CR9_SROM_READ | CR9_SRCS); 1619 dw32(DCR9, CR9_SROM_READ | CR9_SRCS);
1620 udelay(5);
1618 1621
1619 for (i = 16; i > 0; i--) { 1622 for (i = 16; i > 0; i--) {
1620 dw32(DCR9, CR9_SROM_READ | CR9_SRCS | CR9_SRCLK); 1623 dw32(DCR9, CR9_SROM_READ | CR9_SRCS | CR9_SRCLK);
@@ -1626,6 +1629,7 @@ static u16 read_srom_word(void __iomem *ioaddr, int offset)
1626 } 1629 }
1627 1630
1628 dw32(DCR9, CR9_SROM_READ); 1631 dw32(DCR9, CR9_SROM_READ);
1632 udelay(5);
1629 return srom_data; 1633 return srom_data;
1630} 1634}
1631 1635