[rt2x00-users] [PATCH 1/3] rt2x00: allow overriding eeprom through platform_data

Daniel Golle dgolle at allnet.de
Thu Nov 29 23:28:01 AEDT 2012


On 29/11/12 14:13, Helmut Schaa wrote:
> On Thu, Nov 29, 2012 at 1:05 PM, Daniel Golle <dgolle at allnet.de> wrote:
>> -#if defined(CONFIG_RALINK_RT288X) || defined(CONFIG_RALINK_RT305X)
>> -static void rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev)
>> -{
>> -       void __iomem *base_addr = ioremap(0x1F040000, EEPROM_SIZE);
>> -
>> -       memcpy_fromio(rt2x00dev->eeprom, base_addr, EEPROM_SIZE);
>> -
>> -       iounmap(base_addr);
>> -}
>> -#else
>> -static inline void rt2800pci_read_eeprom_soc(struct rt2x00_dev *rt2x00dev)
> 
> I'm unsure if there are any other users for this then OpenWrt. Hence, should we
> leave this in for users that don't yet supply an eeprom file via platform data?
People who using RaLink's SDK would be in trouble when trying to use rt2x00.
However, RaLink's SDK uses a very outdated Linux kernel and whoever is using
that codebase is probably doing that for the sake of using RaLink's
semi-proprietary WiFi driver. (i.e. fon, dd-wrt, wive-ng, ...?)

I guess the original ioremap(...) solution makes the assumption that the
EEPROM-data is stored at a specific physical memory location. There are three
problems with this:

a) different vendors use different locations in the flash for the "factory"
partition (here, an offset of 0x40000 is assumed)

b) many boards use SPI-connected flash rather than physically mapped parallel flash.

c) there are also some bcm63xx and lantiq based boards which use rt2x00 PCIe
wifi modules, obviously
#defined(CONFIG_RALINK_RT288X) || defined(CONFIG_RALINK_RT305X)
would be false in those cases though board-supplied EEPROM data might be needed
(RFC)








More information about the users mailing list