[PATCH] mtd: maps: lantiq-flash: Check if the EBU endianness swap is enabled

Seb sebtx452 at gmail.com
Wed Jan 18 05:48:33 PST 2017


Hi John,


>>
>>       ltq_mtd->map->map_priv_1 = LTQ_NOR_PROBING;
>
> this line should be dropped

Yes, I noticed this mistake. I fixed it but forgotten to add thix fix
to my commit -_-

>> +     /* We swap the addresses only if the EBU endianness swap is disabled */
>> +     if (ltq_ebu_r32(LTQ_EBU_BUSCON0) & BIT(30))
>
> add a define for BIT(30) please and we should really check if this a
> v1.2 or newer. if my memory is correct this was a silicon bug inside
> v1.0 and v1.1

In my kernel (OpenWrt) boot log I have :

[    0.000000] Linux version 4.4.14 (qa at serveurQA) (gcc version 5.3.0
(OpenWrt GCC 5.3.0 50020) ) #150 SMP Tue Jan 17 09:18:24 UTC 2017
[    0.000000] SoC: xRX200 rev 1.2
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019556 (MIPS 34Kc)

It would be better to ensure that the SoC version is >= 1.2 (as this
bug was fixed in this version).

You can get more informations in my OpenWrt pull request :

https://github.com/openwrt/openwrt/pull/321


Regards,

Sebastien.



More information about the linux-mtd mailing list