aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2015-02-14 16:23:04 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2015-02-14 16:23:04 +0000
commit06f874e1f90cef837c6afa14aaeafca3f7dde31a (patch)
tree51f2055c15130ba2cca1b8ef5c416dda6817c4b9 /sys
parentdac0a53840fb703f2cf0acf9b40ccf1d3e57baad (diff)
downloadsrc-06f874e1f90cef837c6afa14aaeafca3f7dde31a.tar.gz
src-06f874e1f90cef837c6afa14aaeafca3f7dde31a.zip
Remove the reserved pin 11 from the HAL check.
The QCA9565 can have RFKILL on GPIO Pin 11, and thus we need to configure it up correctly or the NIC may not function. I'm not sure why the AR9382 can't use GPIO 8 / GPIO 11 ; it's likely hooked up to some external LNA or filter. The real solution is to make it only block pin 8 / pin 11 for AR9382, but the AR9382 probes like an AR9380. Sigh. Submitted by: Anthony Jenkins <scoobi_doo@yahoo.com>
Notes
Notes: svn path=/head/; revision=278759
Diffstat (limited to 'sys')
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c
index 5660c1f03f72..13d3fb396a41 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c
@@ -162,7 +162,6 @@ ar9300_gpio_cfg_output(
HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins);
if ((gpio == AR9382_GPIO_PIN_8_RESERVED) ||
- (gpio == AR9382_GPIO_PIN_11_RESERVED) ||
(gpio == AR9382_GPIO_9_INPUT_ONLY))
{
return AH_FALSE;
@@ -348,7 +347,6 @@ ar9300_gpio_cfg_input(struct ath_hal *ah, u_int32_t gpio)
HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins);
if ((gpio == AR9382_GPIO_PIN_8_RESERVED) ||
- (gpio == AR9382_GPIO_PIN_11_RESERVED) ||
(gpio > AR9382_MAX_GPIO_INPUT_PIN_NUM))
{
return AH_FALSE;
@@ -378,7 +376,6 @@ ar9300_gpio_set(struct ath_hal *ah, u_int32_t gpio, u_int32_t val)
{
HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins);
if ((gpio == AR9382_GPIO_PIN_8_RESERVED) ||
- (gpio == AR9382_GPIO_PIN_11_RESERVED) ||
(gpio == AR9382_GPIO_9_INPUT_ONLY))
{
return AH_FALSE;
@@ -397,8 +394,7 @@ ar9300_gpio_get(struct ath_hal *ah, u_int32_t gpio)
{
u_int32_t gpio_in;
HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins);
- if ((gpio == AR9382_GPIO_PIN_8_RESERVED) ||
- (gpio == AR9382_GPIO_PIN_11_RESERVED))
+ if ((gpio == AR9382_GPIO_PIN_8_RESERVED))
{
return 0xffffffff;
}
@@ -453,7 +449,6 @@ ar9300_gpio_set_intr(struct ath_hal *ah, u_int gpio, u_int32_t ilevel)
HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins);
if ((gpio == AR9382_GPIO_PIN_8_RESERVED) ||
- (gpio == AR9382_GPIO_PIN_11_RESERVED) ||
(gpio > AR9382_MAX_GPIO_INPUT_PIN_NUM))
{
return;
@@ -549,8 +544,7 @@ ar9300_gpio_get_mask(struct ath_hal *ah)
if (AH_PRIVATE(ah)->ah_devid == AR9300_DEVID_AR9380_PCIE) {
mask = (1 << AR9382_MAX_GPIO_PIN_NUM) - 1;
- mask &= ~(1 << AR9382_GPIO_PIN_8_RESERVED |
- 1 << AR9382_GPIO_PIN_11_RESERVED);
+ mask &= ~(1 << AR9382_GPIO_PIN_8_RESERVED);
}
return mask;
}
@@ -562,8 +556,7 @@ ar9300_gpio_set_mask(struct ath_hal *ah, u_int32_t mask, u_int32_t pol_map)
if (AH_PRIVATE(ah)->ah_devid == AR9300_DEVID_AR9380_PCIE) {
invalid = ~((1 << AR9382_MAX_GPIO_PIN_NUM) - 1);
- invalid |= 1 << AR9382_GPIO_PIN_8_RESERVED |
- 1 << AR9382_GPIO_PIN_11_RESERVED;
+ invalid |= 1 << AR9382_GPIO_PIN_8_RESERVED;
}
if (mask & invalid) {
ath_hal_printf(ah, "%s: invalid GPIO mask 0x%x\n", __func__, mask);