ath5k: Check EEPROM before tweaking SERDES
* Read PCI-E infos offset from EEPROM and if it points to serdes section (0x40), enable serdes programming (further tweaking of serdes values during attach). This follows Legacy and Sam's HAL sources. Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Acked-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
d6756d0dc2
commit
c38e7a9348
@@ -167,6 +167,16 @@ ath5k_eeprom_init_header(struct ath5k_hw *ah)
|
||||
ee->ee_rfkill_pin = (u8) AR5K_REG_MS(val, AR5K_EEPROM_RFKILL_GPIO_SEL);
|
||||
ee->ee_rfkill_pol = val & AR5K_EEPROM_RFKILL_POLARITY ? true : false;
|
||||
|
||||
/* Check if PCIE_OFFSET points to PCIE_SERDES_SECTION
|
||||
* and enable serdes programming if needed.
|
||||
*
|
||||
* XXX: Serdes values seem to be fixed so
|
||||
* no need to read them here, we write them
|
||||
* during ath5k_hw_attach */
|
||||
AR5K_EEPROM_READ(AR5K_EEPROM_PCIE_OFFSET, val);
|
||||
ee->ee_serdes = (val == AR5K_EEPROM_PCIE_SERDES_SECTION) ?
|
||||
true : false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user