Author: adrian
Date: Fri Dec 23 08:32:53 2011
New Revision: 228834
URL: http://svn.freebsd.org/changeset/base/228834

Log:
  Port over some GPIO and LED fixes.
  
  * As a preparation for AR9287 GPIO support, add in the AR9287 GPIO mask.
  * Fix the association mask values; these are post-shift values but were
    being shifted in twice. This resulted in some garbage being written
    in the wrong place and the link LED (at least on my d-link AR5416
    NIC) giving totally incorrect blink patterns.

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Fri Dec 23 04:05:39 2011        
(r228833)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Fri Dec 23 08:32:53 2011        
(r228834)
@@ -203,9 +203,9 @@
 #define        AR_MAC_LED_MODE_POWON   5       /* Power LED on (s/w control) */
 #define        AR_MAC_LED_MODE_NETON   6       /* Network LED on (s/w control) 
*/
 #define        AR_MAC_LED_ASSOC        0x00000c00
-#define        AR_MAC_LED_ASSOC_NONE   0x00000000 /* STA is not associated or 
trying */
-#define        AR_MAC_LED_ASSOC_ACTIVE 0x00000400 /* STA is associated */
-#define        AR_MAC_LED_ASSOC_PEND   0x00000800 /* STA is trying to 
associate */
+#define        AR_MAC_LED_ASSOC_NONE   0x0     /* STA is not associated or 
trying */
+#define        AR_MAC_LED_ASSOC_ACTIVE 0x1     /* STA is associated */
+#define        AR_MAC_LED_ASSOC_PEND   0x2     /* STA is trying to associate */
 #define        AR_MAC_LED_ASSOC_S      10
 
 #define        AR_WA_UNTIE_RESET_EN    0x00008000      /* ena PCI reset to POR 
*/
@@ -504,6 +504,8 @@
 #define        AR928X_GPIO_IN_VAL_S    10
 #define        AR9285_GPIO_IN_VAL      0x00FFF000
 #define        AR9285_GPIO_IN_VAL_S    12
+#define        AR9287_GPIO_IN_VAL      0x003FF800
+#define        AR9287_GPIO_IN_VAL_S    11
 
 #define        AR_GPIO_OE_OUT_DRV      0x3     /* 2 bit mask shifted by 
2*bitpos */
 #define        AR_GPIO_OE_OUT_DRV_NO   0x0     /* tristate */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to