diff options
author | Martin Blumenstingl <martin.blumenstingl@googlemail.com> | 2016-12-04 08:26:55 +0100 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2016-12-08 19:36:22 +0100 |
commit | afa37092663d00aa0abf8c61943d9a1b5558b144 (patch) | |
tree | 88a16e468ffea64130d4b408b55470ab94d6e1c1 /scripts/dl_cleanup.py | |
parent | ee55a19a618a30182213937c8c96e056d8f9ed41 (diff) | |
download | upstream-afa37092663d00aa0abf8c61943d9a1b5558b144.tar.gz upstream-afa37092663d00aa0abf8c61943d9a1b5558b144.tar.bz2 upstream-afa37092663d00aa0abf8c61943d9a1b5558b144.zip |
lantiq: fix ath9k EEPROM data swapping for some devices
The EEPROM data in the flash of the ARV7518PW, ARV8539PW22,
BTHOMEHUBV2B and BTHOMEHUBV3A is stored byte-swapped (swab16), meaning
that for example the ath9k base_eep_header fields "version" (high and
low byte), "opCapFlags" and "eepMisc" are swapped (the latter ones are
just 1 byte wide, thus their position is swapped).
The old "ath,eep-endian" property enabled the corresponding swapping
logic in the ath9k driver (swab16 in ath9k_hw_nvram_swap_data, which is
based on the magic bytes in the EEPROM data which have nothing to do
with the calibration data - thus this logic should not be used
anymore).
Since we have switched to the upstream ath9k devicetree bindings there
is no binding anymore which enables swab16 in ath9k (as this logic is
not recommended anymore as explained above), leading to ath9k
initialization errors:
ath: phy0: Bad EEPROM VER 0x0001 or REV 0x00e0
(this shows that the version field is swapped, expected values are VER
0x000E and REV 0x0001)
Swapping the ath9k calibration data when extracting it from the flash
fixes the devices listed above (all other devices do not require
additional swapping, since the position of the fields is already as
expected by ath9k). This allows ath9k to read the version correctly
again, as well as the more important "eepmisc" field (which is used for
determining whether the data inside the EEPROM is Big or Little Endian
which is required to parse the EEPROM contents correctly).
Fixes: a20616863d3 ("lantiq: use ath9k device tree bindings
binding/owl-loader")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Diffstat (limited to 'scripts/dl_cleanup.py')
0 files changed, 0 insertions, 0 deletions