Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Feb 2015 16:23:05 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r278759 - head/sys/contrib/dev/ath/ath_hal/ar9300
Message-ID:  <201502141623.t1EGN56A040188@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sat Feb 14 16:23:04 2015
New Revision: 278759
URL: https://svnweb.freebsd.org/changeset/base/278759

Log:
  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>

Modified:
  head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c

Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c
==============================================================================
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c	Sat Feb 14 15:14:41 2015	(r278758)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c	Sat Feb 14 16:23:04 2015	(r278759)
@@ -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
 
     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_in
 {
     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_in
 {
     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,
     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,
 
     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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502141623.t1EGN56A040188>