diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-04-15 17:38:11 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-16 15:32:02 -0400 |
commit | 783dfca1fceb0140e629d671b67e4be7e8dc7f8d (patch) | |
tree | a1015dae456947f176ed8c03317733ff780e8d7d /drivers | |
parent | 2c5204aa83c3a21c5c3e044342dadf4520cc4558 (diff) |
ath9k_hw: add support for GPIO differences on AR9003
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/reg.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index a55db3bc13e..6f7faf08b92 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -3440,7 +3440,9 @@ u32 ath9k_hw_gpio_get(struct ath_hw *ah, u32 gpio) | |||
3440 | if (gpio >= ah->caps.num_gpio_pins) | 3440 | if (gpio >= ah->caps.num_gpio_pins) |
3441 | return 0xffffffff; | 3441 | return 0xffffffff; |
3442 | 3442 | ||
3443 | if (AR_SREV_9271(ah)) | 3443 | if (AR_SREV_9300_20_OR_LATER(ah)) |
3444 | return MS_REG_READ(AR9300, gpio) != 0; | ||
3445 | else if (AR_SREV_9271(ah)) | ||
3444 | return MS_REG_READ(AR9271, gpio) != 0; | 3446 | return MS_REG_READ(AR9271, gpio) != 0; |
3445 | else if (AR_SREV_9287_10_OR_LATER(ah)) | 3447 | else if (AR_SREV_9287_10_OR_LATER(ah)) |
3446 | return MS_REG_READ(AR9287, gpio) != 0; | 3448 | return MS_REG_READ(AR9287, gpio) != 0; |
diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h index d56b4eada16..d5248914916 100644 --- a/drivers/net/wireless/ath/ath9k/reg.h +++ b/drivers/net/wireless/ath/ath9k/reg.h | |||
@@ -954,6 +954,7 @@ enum { | |||
954 | #define AR9285_NUM_GPIO 12 | 954 | #define AR9285_NUM_GPIO 12 |
955 | #define AR9287_NUM_GPIO 11 | 955 | #define AR9287_NUM_GPIO 11 |
956 | #define AR9271_NUM_GPIO 16 | 956 | #define AR9271_NUM_GPIO 16 |
957 | #define AR9300_NUM_GPIO 17 | ||
957 | 958 | ||
958 | #define AR_GPIO_IN_OUT 0x4048 | 959 | #define AR_GPIO_IN_OUT 0x4048 |
959 | #define AR_GPIO_IN_VAL 0x0FFFC000 | 960 | #define AR_GPIO_IN_VAL 0x0FFFC000 |