Thread (11 messages) flat view 11 messages, 3 authors, 2007-06-13
STALE7037d

[PATCH 4/7] sky2: enable clocks before probe

From: Stephen Hemminger <hidden>
Date: 2007-06-05 00:43:21

Catch-22: On Yukon EX (88E8071) need to have internal clocks enabled
before reading chip id. It is harmless on other chips.

Signed-off-by: Stephen Hemminger <redacted>

---
 drivers/net/sky2.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
--- a/drivers/net/sky2.c	2007-06-04 08:46:43.000000000 -0700
+++ b/drivers/net/sky2.c	2007-06-04 08:46:45.000000000 -0700
@@ -2519,6 +2519,9 @@ static int __devinit sky2_init(struct sk
 {
 	u8 t8;
 
+	/* Enable all clocks */
+	sky2_pci_write32(hw, PCI_DEV_REG3, 0);
+
 	sky2_write8(hw, B0_CTST, CS_RST_CLR);
 
 	hw->chip_id = sky2_read8(hw, B2_CHIP_ID);
@@ -2532,10 +2535,6 @@ static int __devinit sky2_init(struct sk
 		dev_warn(&hw->pdev->dev, "this driver not yet tested on this chip type\n"
 			 "Please report success or failure to <netdev@vger.kernel.org>\n");
 
-	/* Make sure and enable all clocks */
-	if (hw->chip_id == CHIP_ID_YUKON_EX || hw->chip_id == CHIP_ID_YUKON_EC_U)
-		sky2_pci_write32(hw, PCI_DEV_REG3, 0);
-
 	hw->chip_rev = (sky2_read8(hw, B2_MAC_CFG) & CFG_CHIP_R_MSK) >> 4;
 
 	/* This rev is really old, and requires untested workarounds */
-- 
Stephen Hemminger <shemminger@linux-foundation.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help