aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.h
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-05-14 20:04:17 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-05-30 22:19:17 -0400
commita068c0adf2fe28b324bca87f85d27af7f993cdaf (patch)
tree0c7685f8061825641d153abd738222ca05f52fac /drivers/net/sky2.h
parentdb99b98885e717454feef1c6868b27d3f23c2e7c (diff)
sky2: pci power savings
Turn on special bits to save more power when device is shutdown. Tested on a limited range of hardware, some of the bits are for hardware that probably isn't even in production (like Yukon Supreme) and was ported from the vendor driver. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sky2.h')
-rw-r--r--drivers/net/sky2.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
index d63106cd74b..1fa82bf029d 100644
--- a/drivers/net/sky2.h
+++ b/drivers/net/sky2.h
@@ -28,6 +28,11 @@ enum pci_dev_reg_1 {
28 PCI_Y2_PHY2_POWD = 1<<27, /* Set PHY 2 to Power Down (YUKON-2) */ 28 PCI_Y2_PHY2_POWD = 1<<27, /* Set PHY 2 to Power Down (YUKON-2) */
29 PCI_Y2_PHY1_POWD = 1<<26, /* Set PHY 1 to Power Down (YUKON-2) */ 29 PCI_Y2_PHY1_POWD = 1<<26, /* Set PHY 1 to Power Down (YUKON-2) */
30 PCI_Y2_PME_LEGACY= 1<<15, /* PCI Express legacy power management mode */ 30 PCI_Y2_PME_LEGACY= 1<<15, /* PCI Express legacy power management mode */
31
32 PCI_PHY_LNK_TIM_MSK= 3L<<8,/* Bit 9.. 8: GPHY Link Trigger Timer */
33 PCI_ENA_L1_EVENT = 1<<7, /* Enable PEX L1 Event */
34 PCI_ENA_GPHY_LNK = 1<<6, /* Enable PEX L1 on GPHY Link down */
35 PCI_FORCE_PEX_L1 = 1<<5, /* Force to PEX L1 */
31}; 36};
32 37
33enum pci_dev_reg_2 { 38enum pci_dev_reg_2 {
@@ -45,7 +50,11 @@ enum pci_dev_reg_2 {
45 50
46/* PCI_OUR_REG_4 32 bit Our Register 4 (Yukon-ECU only) */ 51/* PCI_OUR_REG_4 32 bit Our Register 4 (Yukon-ECU only) */
47enum pci_dev_reg_4 { 52enum pci_dev_reg_4 {
48 /* (Link Training & Status State Machine) */ 53 /* (Link Training & Status State Machine) */
54 P_PEX_LTSSM_STAT_MSK = 0x7fL<<25, /* Bit 31..25: PEX LTSSM Mask */
55#define P_PEX_LTSSM_STAT(x) ((x << 25) & P_PEX_LTSSM_STAT_MSK)
56 P_PEX_LTSSM_L1_STAT = 0x34,
57 P_PEX_LTSSM_DET_STAT = 0x01,
49 P_TIMER_VALUE_MSK = 0xffL<<16, /* Bit 23..16: Timer Value Mask */ 58 P_TIMER_VALUE_MSK = 0xffL<<16, /* Bit 23..16: Timer Value Mask */
50 /* (Active State Power Management) */ 59 /* (Active State Power Management) */
51 P_FORCE_ASPM_REQUEST = 1<<15, /* Force ASPM Request (A1 only) */ 60 P_FORCE_ASPM_REQUEST = 1<<15, /* Force ASPM Request (A1 only) */
@@ -454,6 +463,9 @@ enum yukon_ex_rev {
454 CHIP_REV_YU_EX_A0 = 1, 463 CHIP_REV_YU_EX_A0 = 1,
455 CHIP_REV_YU_EX_B0 = 2, 464 CHIP_REV_YU_EX_B0 = 2,
456}; 465};
466enum yukon_supr_rev {
467 CHIP_REV_YU_SU_A0 = 0,
468};
457 469
458 470
459/* B2_Y2_CLK_GATE 8 bit Clock Gating (Yukon-2 only) */ 471/* B2_Y2_CLK_GATE 8 bit Clock Gating (Yukon-2 only) */
@@ -2059,7 +2071,9 @@ struct sky2_hw {
2059#define SKY2_HW_NEW_LE 0x00000020 /* new LSOv2 format */ 2071#define SKY2_HW_NEW_LE 0x00000020 /* new LSOv2 format */
2060#define SKY2_HW_AUTO_TX_SUM 0x00000040 /* new IP decode for Tx */ 2072#define SKY2_HW_AUTO_TX_SUM 0x00000040 /* new IP decode for Tx */
2061#define SKY2_HW_ADV_POWER_CTL 0x00000080 /* additional PHY power regs */ 2073#define SKY2_HW_ADV_POWER_CTL 0x00000080 /* additional PHY power regs */
2074#define SKY2_HW_CLK_POWER 0x00000100 /* clock power management */
2062 2075
2076 int pm_cap;
2063 u8 chip_id; 2077 u8 chip_id;
2064 u8 chip_rev; 2078 u8 chip_rev;
2065 u8 pmd_type; 2079 u8 pmd_type;