All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org
Subject: [PATCH 4/7] sky2: enable clocks before probe
Date: Mon, 04 Jun 2007 17:23:24 -0700	[thread overview]
Message-ID: <20070605002738.861630497@linux-foundation.org> (raw)
In-Reply-To: 20070605002320.868185090@linux-foundation.org

[-- Attachment #1: sky2-ex-power.patch --]
[-- Type: text/plain, Size: 1206 bytes --]

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 <shemminger@linux-foundation.org>

---
 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>


  parent reply	other threads:[~2007-06-05  0:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-05  0:23 [PATCH 0/7] sky2 version 1.15 (88e8071) support Stephen Hemminger
2007-06-05  0:23 ` [PATCH 1/7] sky2: avoid reserved regions on ethtool reg dump Stephen Hemminger
2007-06-13 20:44   ` Jeff Garzik
2007-06-05  0:23 ` [PATCH 2/7] sky2: Add PCI device specfic register 4 & 5 Stephen Hemminger
2007-06-05  0:23 ` [PATCH 3/7] sky2: rename BMU register Stephen Hemminger
2007-06-05  0:23 ` Stephen Hemminger [this message]
2007-06-05  0:23 ` [PATCH 5/7] sky2: GPIO register Stephen Hemminger
2007-06-05  0:23 ` [PATCH 6/7] sky2: Yukon Extreme (88e8071) support Stephen Hemminger
2007-06-05  0:23 ` [PATCH 7/7] sky2: version 1.15 Stephen Hemminger
2007-06-13 20:05 ` [PATCH 0/7] sky2 version 1.15 (88e8071) support Jeff Garzik
2007-06-13 20:37   ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070605002738.861630497@linux-foundation.org \
    --to=shemminger@linux-foundation.org \
    --cc=jgarzik@pobox.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.