summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2015-02-14 16:23:04 +0000
committeradrian <adrian@FreeBSD.org>2015-02-14 16:23:04 +0000
commit3d0e2a1335d0d1e53644294ddf5edf6c3d3346f2 (patch)
tree51f2055c15130ba2cca1b8ef5c416dda6817c4b9 /sys/contrib/dev
parentc9c9d17fcba54c156d51c2a765e389c9807ccc9c (diff)
downloadFreeBSD-src-3d0e2a1335d0d1e53644294ddf5edf6c3d3346f2.zip
FreeBSD-src-3d0e2a1335d0d1e53644294ddf5edf6c3d3346f2.tar.gz
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>
Diffstat (limited to 'sys/contrib/dev')
-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 5660c1f..13d3fb3 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);
OpenPOWER on IntegriCloud