]> err.no Git - linux-2.6/commitdiff
sky2: clear PCI power control reg at startup
authorStephen Hemminger <shemminger@linux-foundation.org>
Tue, 21 Aug 2007 21:34:02 +0000 (14:34 -0700)
committerJeff Garzik <jeff@garzik.org>
Sat, 25 Aug 2007 06:31:06 +0000 (02:31 -0400)
Make sure PCI register for PHY power gets cleared on boot, and make
sure to avoid any PCI posting problems.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/sky2.c

index 757592436390780057902bcd91ddc264eeeeafd6..33ba3486389edb68b3c694afe6cc1fda206f0dea 100644 (file)
@@ -219,9 +219,12 @@ static void sky2_power_on(struct sky2_hw *hw)
        else
                sky2_write8(hw, B2_Y2_CLK_GATE, 0);
 
-       if (hw->chip_id == CHIP_ID_YUKON_EC_U || hw->chip_id == CHIP_ID_YUKON_EX) {
+       if (hw->chip_id == CHIP_ID_YUKON_EC_U ||
+           hw->chip_id == CHIP_ID_YUKON_EX) {
                u32 reg;
 
+               sky2_pci_write32(hw, PCI_DEV_REG3, 0);
+
                reg = sky2_pci_read32(hw, PCI_DEV_REG4);
                /* set all bits to 0 except bits 15..12 and 8 */
                reg &= P_ASPM_CONTROL_MSK;
@@ -238,6 +241,8 @@ static void sky2_power_on(struct sky2_hw *hw)
                reg = sky2_read32(hw, B2_GP_IO);
                reg |= GLB_GPIO_STAT_RACE_DIS;
                sky2_write32(hw, B2_GP_IO, reg);
+
+               sky2_read32(hw, B2_GP_IO);
        }
 }