Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194420
b: refs/heads/master
c: 4b01931
h: refs/heads/master
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Apr 16, 2010
1 parent 9cd1a93 commit 3e477c5
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 77d6d39a77939e5ed7e2ec72a1c1dce828ee582e
refs/heads/master: 4b01931e3a3ca5ec49604e2b279b8b9dd42fbe4c
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/ar9002_calib.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ static void ar9002_hw_setup_calibration(struct ath_hw *ah,
ath_print(common, ATH_DBG_CALIBRATE,
"starting Init ADC DC Calibration\n");
break;
case TEMP_COMP_CAL:
break; /* Not supported */
}

REG_SET_BIT(ah, AR_PHY_TIMING_CTRL4(0),
Expand Down
36 changes: 35 additions & 1 deletion trunk/drivers/net/wireless/ath/ath9k/ar9003_calib.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,41 @@
static void ar9003_hw_setup_calibration(struct ath_hw *ah,
struct ath9k_cal_list *currCal)
{
/* TODO */
struct ath_common *common = ath9k_hw_common(ah);

/* Select calibration to run */
switch (currCal->calData->calType) {
case IQ_MISMATCH_CAL:
/*
* Start calibration with
* 2^(INIT_IQCAL_LOG_COUNT_MAX+1) samples
*/
REG_RMW_FIELD(ah, AR_PHY_TIMING4,
AR_PHY_TIMING4_IQCAL_LOG_COUNT_MAX,
currCal->calData->calCountMax);
REG_WRITE(ah, AR_PHY_CALMODE, AR_PHY_CALMODE_IQ);

ath_print(common, ATH_DBG_CALIBRATE,
"starting IQ Mismatch Calibration\n");

/* Kick-off cal */
REG_SET_BIT(ah, AR_PHY_TIMING4, AR_PHY_TIMING4_DO_CAL);
break;
case TEMP_COMP_CAL:
REG_RMW_FIELD(ah, AR_PHY_65NM_CH0_THERM,
AR_PHY_65NM_CH0_THERM_LOCAL, 1);
REG_RMW_FIELD(ah, AR_PHY_65NM_CH0_THERM,
AR_PHY_65NM_CH0_THERM_START, 1);

ath_print(common, ATH_DBG_CALIBRATE,
"starting Temperature Compensation Calibration\n");
break;
case ADC_DC_INIT_CAL:
case ADC_GAIN_CAL:
case ADC_DC_CAL:
/* Not yet */
break;
}
}

static bool ar9003_hw_calibrate(struct ath_hw *ah,
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/ath/ath9k/calib.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ enum ath9k_cal_types {
ADC_DC_INIT_CAL = 0x1,
ADC_GAIN_CAL = 0x2,
ADC_DC_CAL = 0x4,
IQ_MISMATCH_CAL = 0x8
IQ_MISMATCH_CAL = 0x8,
TEMP_COMP_CAL = 0x10,
};

enum ath9k_cal_state {
Expand Down

0 comments on commit 3e477c5

Please sign in to comment.