Author: adrian
Date: Sat May  7 02:59:24 2011
New Revision: 221574
URL: http://svn.freebsd.org/changeset/base/221574

Log:
  Change AR_SREV_OWL_{X}_OR_LATER to AR_SREV_5416_{X}_OR_LATER.
  
  For now, these are equivalent macros. AR_SREV_OWL{X}_OR_LATER
  will later change to exclude Howl (AR9130) in line with what
  the Atheros HAL does.
  
  This should not functionally change anything.
  
  Obtained from:        Atheros

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h
  head/sys/dev/ath/ath_hal/ar9002/ar9280_olc.c
  head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c      Sat May  7 02:54:52 
2011        (r221573)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c      Sat May  7 02:59:24 
2011        (r221574)
@@ -1465,7 +1465,7 @@ ar5416GetRegChainOffset(struct ath_hal *
 {
        int regChainOffset;
 
-       if (AR_SREV_OWL_20_OR_LATER(ah) && 
+       if (AR_SREV_5416_V20_OR_LATER(ah) && 
            (AH5416(ah)->ah_rx_chainmask == 0x5 ||
            AH5416(ah)->ah_tx_chainmask == 0x5) && (i != 0)) {
                /* Regs are swapped from chain 2 to 1 for 5416 2_0 with 
@@ -1518,7 +1518,7 @@ ar5416SetBoardValues(struct ath_hal *ah,
         * XXX update
          */
 
-        if ((i == 0) || AR_SREV_OWL_20_OR_LATER(ah))
+        if ((i == 0) || AR_SREV_5416_V20_OR_LATER(ah))
            ar5416SetDefGainValues(ah, pModal, eep, txRxAttenLocal, 
regChainOffset, i);
 
     }
@@ -2217,7 +2217,7 @@ ar5416SetPowerCalTable(struct ath_hal *a
                                              &tMinCalPower, gainBoundaries,
                                              pdadcValues, numXpdGain);
 
-            if ((i == 0) || AR_SREV_OWL_20_OR_LATER(ah)) {
+            if ((i == 0) || AR_SREV_5416_V20_OR_LATER(ah)) {
                ar5416SetGainBoundariesClosedLoop(ah, i, pdGainOverlap_t2,
                  gainBoundaries);
             }
@@ -2329,7 +2329,7 @@ ar5416GetGainBoundariesAndPdadcs(struct 
         pPdGainBoundaries[i] = (uint16_t)AH_MIN(AR5416_MAX_RATE_POWER, 
pPdGainBoundaries[i]);
 
        /* NB: only applies to owl 1.0 */
-        if ((i == 0) && !AR_SREV_OWL_20_OR_LATER(ah) ) {
+        if ((i == 0) && !AR_SREV_5416_V20_OR_LATER(ah) ) {
            /*
              * fix the gain delta, but get a delta that can be applied to min 
to
              * keep the upper power values accurate, don't think max needs to
@@ -2501,27 +2501,20 @@ ar5416OverrideIni(struct ath_hal *ah, co
         }
 
        /*
-        * The AR5416 initvals have this already set to 0x11; AR9160 has
-        * the register set to 0x0. Figure out whether AR9130/AR9160 needs
-        * this before moving forward with it.
-        */
-#if 0
-       /* Disable BB clock gating for AR5416v2, AR9130, AR9160 */
-        if (AR_SREV_OWL_20_OR_LATER(ah) || AR_SREV_HOWL(ah) || 
AR_SREV_SOWL(ah)) {
-               /*
-                * Disable BB clock gating
-                * Necessary to avoid issues on AR5416 2.0
-                */
-               OS_REG_WRITE(ah, 0x9800 + (651 << 2), 0x11);
-       }
-#endif
-
-       /*
         * Disable RIFS search on some chips to avoid baseband
         * hang issues.
         */
        if (AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah))
                (void) ar5416SetRifsDelay(ah, AH_FALSE);
+
+        if (!AR_SREV_5416_V20_OR_LATER(ah) || AR_SREV_MERLIN(ah))
+               return;
+
+       /*
+        * Disable BB clock gating
+        * Necessary to avoid issues on AR5416 2.0
+        */
+       OS_REG_WRITE(ah, 0x9800 + (651 << 2), 0x11);
 }
 
 struct ini {

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h        Sat May  7 02:54:52 
2011        (r221573)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416desc.h        Sat May  7 02:59:24 
2011        (r221574)
@@ -387,11 +387,11 @@ struct ar5416_desc {
 #define RXSTATUS_OFFSET(ah)    4
 #define RXSTATUS_NUMWORDS(ah)  9
 #define RXSTATUS_RATE(ah, ads) \
-       (AR_SREV_OWL_20_OR_LATER(ah) ? \
+       (AR_SREV_5416_V20_OR_LATER(ah) ? \
         MS((ads)->ds_rxstatus0, AR_RxRate) : \
         ((ads)->ds_rxstatus3 >> 2) & 0xFF)
 #define RXSTATUS_DUPLICATE(ah, ads) \
-       (AR_SREV_OWL_20_OR_LATER(ah) ?  \
+       (AR_SREV_5416_V20_OR_LATER(ah) ?        \
         MS((ads)->ds_rxstatus3, AR_Parallel40) : \
         ((ads)->ds_rxstatus3 >> 10) & 0x1)
 #endif /* _ATH_AR5416_DESC_H_ */

Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280_olc.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar9002/ar9280_olc.c        Sat May  7 02:54:52 
2011        (r221573)
+++ head/sys/dev/ath/ath_hal/ar9002/ar9280_olc.c        Sat May  7 02:59:24 
2011        (r221574)
@@ -368,7 +368,7 @@ ar9280SetPowerCalTable(struct ath_hal *a
                            gainBoundaries, numXpdGain, pdGainOverlap_t2,
                            pwr_table_offset, &diff);
 
-                       if ((i == 0) || AR_SREV_OWL_20_OR_LATER(ah)) {
+                       if ((i == 0) || AR_SREV_5416_V20_OR_LATER(ah)) {
                                /* Set gain boundaries for either open- or 
closed-loop TPC */
                                if (AR_SREV_MERLIN_20_OR_LATER(ah) &&
                                    ath_hal_eepromGetFlag(ah, 
AR_EEP_OL_PWRCTRL))

Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c      Sat May  7 02:54:52 
2011        (r221573)
+++ head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c      Sat May  7 02:59:24 
2011        (r221574)
@@ -648,7 +648,7 @@ ar9285SetPowerCalTable(struct ath_hal *a
                                              &tMinCalPower, gainBoundaries,
                                              pdadcValues, numXpdGain);
 
-            if ((i == 0) || AR_SREV_OWL_20_OR_LATER(ah)) {
+            if ((i == 0) || AR_SREV_5416_V20_OR_LATER(ah)) {
                 /*
                  * Note the pdadc table may not start at 0 dBm power, could be
                  * negative or greater than 0.  Need to offset the power
@@ -762,7 +762,7 @@ ar9285GetGainBoundariesAndPdadcs(struct 
         pPdGainBoundaries[i] = (uint16_t)AH_MIN(AR5416_MAX_RATE_POWER, 
pPdGainBoundaries[i]);
 
        /* NB: only applies to owl 1.0 */
-        if ((i == 0) && !AR_SREV_OWL_20_OR_LATER(ah) ) {
+        if ((i == 0) && !AR_SREV_5416_V20_OR_LATER(ah) ) {
            /*
              * fix the gain delta, but get a delta that can be applied to min 
to
              * keep the upper power values accurate, don't think max needs to
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to