diff options
author | Huang, Xiong <xiong@qca.qualcomm.com> | 2012-04-18 18:01:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-19 20:14:20 -0400 |
commit | 5cbdcc2f49b4a8372052952799d2cb1de387443b (patch) | |
tree | 7a6ad570c04d880a26febdc1ad613e8a3a9a90de /drivers/net/ethernet/atheros/atl1c/atl1c_main.c | |
parent | 7f5544d6693ab2593b4f13521a577387f3be6b2f (diff) |
atl1c: clear bit MASTER_CTRL_CLK_SEL_DIS in atl1c_pcie_patch
bit MASTER_CTRL_CLK_SEL_DIS could be set before enter suspend
clear it after resume to enable pclk(PCIE clock) switch to
low frequency(25M) in some circumstances to save power.
Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/atheros/atl1c/atl1c_main.c')
-rw-r--r-- | drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c index 796cc758c967..9783afc8cb38 100644 --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c | |||
@@ -80,7 +80,12 @@ static const u32 atl1c_default_msg = NETIF_MSG_DRV | NETIF_MSG_PROBE | | |||
80 | NETIF_MSG_LINK | NETIF_MSG_TIMER | NETIF_MSG_IFDOWN | NETIF_MSG_IFUP; | 80 | NETIF_MSG_LINK | NETIF_MSG_TIMER | NETIF_MSG_IFDOWN | NETIF_MSG_IFUP; |
81 | static void atl1c_pcie_patch(struct atl1c_hw *hw) | 81 | static void atl1c_pcie_patch(struct atl1c_hw *hw) |
82 | { | 82 | { |
83 | u32 data; | 83 | u32 mst_data, data; |
84 | |||
85 | /* pclk sel could switch to 25M */ | ||
86 | AT_READ_REG(hw, REG_MASTER_CTRL, &mst_data); | ||
87 | mst_data &= ~MASTER_CTRL_CLK_SEL_DIS; | ||
88 | AT_WRITE_REG(hw, REG_MASTER_CTRL, mst_data); | ||
84 | 89 | ||
85 | AT_READ_REG(hw, REG_PCIE_PHYMISC, &data); | 90 | AT_READ_REG(hw, REG_PCIE_PHYMISC, &data); |
86 | data |= PCIE_PHYMISC_FORCE_RCV_DET; | 91 | data |= PCIE_PHYMISC_FORCE_RCV_DET; |