提交 7944f8e4 编写于 作者: W Wey-Yi Guy 提交者: Reinette Chatre

iwlwifi: more generic eeprom defines

Some definition for eeprom apply to more than 5000 series device, change
the name to reflect it for easy reading.
Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
上级 b6e4c55a
...@@ -331,7 +331,7 @@ u16 iwlagn_eeprom_calib_version(struct iwl_priv *priv) ...@@ -331,7 +331,7 @@ u16 iwlagn_eeprom_calib_version(struct iwl_priv *priv)
} *hdr; } *hdr;
hdr = (struct iwl_eeprom_calib_hdr *)iwl_eeprom_query_addr(priv, hdr = (struct iwl_eeprom_calib_hdr *)iwl_eeprom_query_addr(priv,
EEPROM_5000_CALIB_ALL); EEPROM_CALIB_ALL);
return hdr->version; return hdr->version;
} }
...@@ -348,22 +348,22 @@ static u32 eeprom_indirect_address(const struct iwl_priv *priv, u32 address) ...@@ -348,22 +348,22 @@ static u32 eeprom_indirect_address(const struct iwl_priv *priv, u32 address)
switch (address & INDIRECT_TYPE_MSK) { switch (address & INDIRECT_TYPE_MSK) {
case INDIRECT_HOST: case INDIRECT_HOST:
offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_HOST); offset = iwl_eeprom_query16(priv, EEPROM_LINK_HOST);
break; break;
case INDIRECT_GENERAL: case INDIRECT_GENERAL:
offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_GENERAL); offset = iwl_eeprom_query16(priv, EEPROM_LINK_GENERAL);
break; break;
case INDIRECT_REGULATORY: case INDIRECT_REGULATORY:
offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_REGULATORY); offset = iwl_eeprom_query16(priv, EEPROM_LINK_REGULATORY);
break; break;
case INDIRECT_CALIBRATION: case INDIRECT_CALIBRATION:
offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_CALIBRATION); offset = iwl_eeprom_query16(priv, EEPROM_LINK_CALIBRATION);
break; break;
case INDIRECT_PROCESS_ADJST: case INDIRECT_PROCESS_ADJST:
offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_PROCESS_ADJST); offset = iwl_eeprom_query16(priv, EEPROM_LINK_PROCESS_ADJST);
break; break;
case INDIRECT_OTHERS: case INDIRECT_OTHERS:
offset = iwl_eeprom_query16(priv, EEPROM_5000_LINK_OTHERS); offset = iwl_eeprom_query16(priv, EEPROM_LINK_OTHERS);
break; break;
default: default:
IWL_ERR(priv, "illegal indirect type: 0x%X\n", IWL_ERR(priv, "illegal indirect type: 0x%X\n",
......
...@@ -207,7 +207,7 @@ static int iwlagn_set_Xtal_calib(struct iwl_priv *priv) ...@@ -207,7 +207,7 @@ static int iwlagn_set_Xtal_calib(struct iwl_priv *priv)
{ {
struct iwl_calib_xtal_freq_cmd cmd; struct iwl_calib_xtal_freq_cmd cmd;
__le16 *xtal_calib = __le16 *xtal_calib =
(__le16 *)iwl_eeprom_query_addr(priv, EEPROM_5000_XTAL); (__le16 *)iwl_eeprom_query_addr(priv, EEPROM_XTAL);
cmd.hdr.op_code = IWL_PHY_CALIBRATE_CRYSTAL_FRQ_CMD; cmd.hdr.op_code = IWL_PHY_CALIBRATE_CRYSTAL_FRQ_CMD;
cmd.hdr.first_group = 0; cmd.hdr.first_group = 0;
......
...@@ -172,22 +172,22 @@ struct iwl_eeprom_enhanced_txpwr { ...@@ -172,22 +172,22 @@ struct iwl_eeprom_enhanced_txpwr {
#define EEPROM_5000_TX_POWER_VERSION (4) #define EEPROM_5000_TX_POWER_VERSION (4)
#define EEPROM_5000_EEPROM_VERSION (0x11A) #define EEPROM_5000_EEPROM_VERSION (0x11A)
/*5000 calibrations */ /* 5000 and up calibration */
#define EEPROM_5000_CALIB_ALL (INDIRECT_ADDRESS | INDIRECT_CALIBRATION) #define EEPROM_CALIB_ALL (INDIRECT_ADDRESS | INDIRECT_CALIBRATION)
#define EEPROM_5000_XTAL ((2*0x128) | EEPROM_5000_CALIB_ALL) #define EEPROM_XTAL ((2*0x128) | EEPROM_CALIB_ALL)
#define EEPROM_5000_TEMPERATURE ((2*0x12A) | EEPROM_5000_CALIB_ALL)
/* 5000 temperature */
/* 5000 links */ #define EEPROM_5000_TEMPERATURE ((2*0x12A) | EEPROM_CALIB_ALL)
#define EEPROM_5000_LINK_HOST (2*0x64)
#define EEPROM_5000_LINK_GENERAL (2*0x65) /* agn links */
#define EEPROM_5000_LINK_REGULATORY (2*0x66) #define EEPROM_LINK_HOST (2*0x64)
#define EEPROM_5000_LINK_CALIBRATION (2*0x67) #define EEPROM_LINK_GENERAL (2*0x65)
#define EEPROM_5000_LINK_PROCESS_ADJST (2*0x68) #define EEPROM_LINK_REGULATORY (2*0x66)
#define EEPROM_5000_LINK_OTHERS (2*0x69) #define EEPROM_LINK_CALIBRATION (2*0x67)
#define EEPROM_LINK_PROCESS_ADJST (2*0x68)
/* 5000 regulatory - indirect access */ #define EEPROM_LINK_OTHERS (2*0x69)
#define EEPROM_5000_REG_SKU_ID ((0x02)\
| INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 4 bytes */ /* agn regulatory - indirect access */
#define EEPROM_REG_BAND_1_CHANNELS ((0x08)\ #define EEPROM_REG_BAND_1_CHANNELS ((0x08)\
| INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 28 bytes */ | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 28 bytes */
#define EEPROM_REG_BAND_2_CHANNELS ((0x26)\ #define EEPROM_REG_BAND_2_CHANNELS ((0x26)\
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册