diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2010-03-17 04:55:23 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-23 16:50:16 -0400 |
commit | 05020d236e91ddab1cb42483843a8995b3be1adf (patch) | |
tree | c64c9ffc8facd2a31bb28392ba4a3d226239368f /drivers | |
parent | 25e2ab17fd77e752597050980cec4efae7f87854 (diff) |
ath9k_hw: add HTC init hardware call for special resets for AR9271
AR9271 needs a full reset only upon the first reset, add
a call for the driver to enable these special resets. We
can optimize this out later without an export.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 5bc5f5fdff57..05aeb511c686 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1951,6 +1951,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
1951 | 1951 | ||
1952 | ath9k_hw_mark_phy_inactive(ah); | 1952 | ath9k_hw_mark_phy_inactive(ah); |
1953 | 1953 | ||
1954 | /* Only required on the first reset */ | ||
1954 | if (AR_SREV_9271(ah) && ah->htc_reset_init) { | 1955 | if (AR_SREV_9271(ah) && ah->htc_reset_init) { |
1955 | REG_WRITE(ah, | 1956 | REG_WRITE(ah, |
1956 | AR9271_RESET_POWER_DOWN_CONTROL, | 1957 | AR9271_RESET_POWER_DOWN_CONTROL, |
@@ -1963,6 +1964,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
1963 | return -EINVAL; | 1964 | return -EINVAL; |
1964 | } | 1965 | } |
1965 | 1966 | ||
1967 | /* Only required on the first reset */ | ||
1966 | if (AR_SREV_9271(ah) && ah->htc_reset_init) { | 1968 | if (AR_SREV_9271(ah) && ah->htc_reset_init) { |
1967 | ah->htc_reset_init = false; | 1969 | ah->htc_reset_init = false; |
1968 | REG_WRITE(ah, | 1970 | REG_WRITE(ah, |
@@ -3857,6 +3859,16 @@ void ath_gen_timer_isr(struct ath_hw *ah) | |||
3857 | } | 3859 | } |
3858 | EXPORT_SYMBOL(ath_gen_timer_isr); | 3860 | EXPORT_SYMBOL(ath_gen_timer_isr); |
3859 | 3861 | ||
3862 | /********/ | ||
3863 | /* HTC */ | ||
3864 | /********/ | ||
3865 | |||
3866 | void ath9k_hw_htc_resetinit(struct ath_hw *ah) | ||
3867 | { | ||
3868 | ah->htc_reset_init = true; | ||
3869 | } | ||
3870 | EXPORT_SYMBOL(ath9k_hw_htc_resetinit); | ||
3871 | |||
3860 | static struct { | 3872 | static struct { |
3861 | u32 version; | 3873 | u32 version; |
3862 | const char * name; | 3874 | const char * name; |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index e63edfb91590..6b03e1688b22 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -707,6 +707,9 @@ u32 ath9k_hw_gettsf32(struct ath_hw *ah); | |||
707 | 707 | ||
708 | void ath9k_hw_name(struct ath_hw *ah, char *hw_name, size_t len); | 708 | void ath9k_hw_name(struct ath_hw *ah, char *hw_name, size_t len); |
709 | 709 | ||
710 | /* HTC */ | ||
711 | void ath9k_hw_htc_resetinit(struct ath_hw *ah); | ||
712 | |||
710 | #define ATH_PCIE_CAP_LINK_CTRL 0x70 | 713 | #define ATH_PCIE_CAP_LINK_CTRL 0x70 |
711 | #define ATH_PCIE_CAP_LINK_L0S 1 | 714 | #define ATH_PCIE_CAP_LINK_L0S 1 |
712 | #define ATH_PCIE_CAP_LINK_L1 2 | 715 | #define ATH_PCIE_CAP_LINK_L1 2 |