Re: [ath9k-devel] [PATCH 5/5] ath9k: Make EEPROM endianness swapping configurable via devicetree

2016-08-30 Thread Arnd Bergmann
On Tuesday 30 August 2016, Martin Blumenstingl wrote: > new logic (assuming that we went for __le16/__le32 fields): > - reading data: use le16_to_cpu and le32_to_cpu for all fields > > LE system: > - LE EEPROM -> no swap will be applied > - BE EEPROM -> be16_to_cpu / be32_to_cpu (or swab16 / swab3

Re: [ath9k-devel] [PATCH 5/5] ath9k: Make EEPROM endianness swapping configurable via devicetree

2016-08-29 Thread Martin Blumenstingl
On Mon, Aug 29, 2016 at 11:25 PM, Arnd Bergmann wrote: > On Monday 29 August 2016, Martin Blumenstingl wrote: >> > and then do a swab32() on them. I suspect these should just be __le32 >> > (and __le16, respectively where needed), using appropriate accessors >> > everywhere that those fields are b

Re: [ath9k-devel] [PATCH 5/5] ath9k: Make EEPROM endianness swapping configurable via devicetree

2016-08-29 Thread Arnd Bergmann
On Monday 29 August 2016, Martin Blumenstingl wrote: > > and then do a swab32() on them. I suspect these should just be __le32 > > (and __le16, respectively where needed), using appropriate accessors > > everywhere that those fields are being read instead of having one function > > that tries to tu

Re: [ath9k-devel] [PATCH 5/5] ath9k: Make EEPROM endianness swapping configurable via devicetree

2016-08-29 Thread Martin Blumenstingl
On Mon, Aug 29, 2016 at 2:10 PM, Arnd Bergmann wrote: >> Without patch 4 from this series the EEPROM data is loaded like this: >> 1. out of tree code extracts the EEPROM data from NOR/SPI/NAND flash >> 2. board specific entry (usually device-tree) tells the code to apply >> swab16 to the data >> 3

Re: [ath9k-devel] [PATCH 5/5] ath9k: Make EEPROM endianness swapping configurable via devicetree

2016-08-29 Thread Arnd Bergmann
On Sunday 28 August 2016, Martin Blumenstingl wrote: > On Mon, Aug 22, 2016 at 1:52 PM, Arnd Bergmann wrote: > > On Sunday, August 21, 2016 4:49:06 PM CEST Martin Blumenstingl wrote: > >> +- qca,check-eeprom-endianness: When enabled, the driver checks if the > >> + en

Re: [ath9k-devel] [PATCH 5/5] ath9k: Make EEPROM endianness swapping configurable via devicetree

2016-08-28 Thread Martin Blumenstingl
On Mon, Aug 22, 2016 at 1:52 PM, Arnd Bergmann wrote: > On Sunday, August 21, 2016 4:49:06 PM CEST Martin Blumenstingl wrote: >> +- qca,check-eeprom-endianness: When enabled, the driver checks if the >> + endianness of the EEPROM (using two checks, >> +

Re: [ath9k-devel] [PATCH 5/5] ath9k: Make EEPROM endianness swapping configurable via devicetree

2016-08-22 Thread Arnd Bergmann
On Sunday, August 21, 2016 4:49:06 PM CEST Martin Blumenstingl wrote: > +- qca,check-eeprom-endianness: When enabled, the driver checks if the > + endianness of the EEPROM (using two checks, > + one is based on the two magic bytes at the >