[PATCH] mtd: maps: lantiq-flash: Check if the EBU endianness swap is enabled
Seb
sebtx452 at gmail.com
Wed Jan 18 09:12:09 PST 2017
> the bug is also fixed on the 300 and 500 series chips, so we would want
> to check for that aswell.
>
I added this to the begin of "ltq_mtd_probe" function:
bool mtd_addr_swap;
if ( ltq_ebu_r32(LTQ_EBU_BUSCON0) & EBU_ENDIAN_SWAP ) {
switch (ltq_soc_type()) {
case SOC_TYPE_VR9_2 :
case SOC_TYPE_AR10 :
mtd_addr_swap = false;
break;
default :
mtd_addr_swap = true;
}
} else mtd_addr_swap = true;
It's easier to add other architectures as needed. I tried it on my
OpenWrt release, and got it working fine. Is it correct in this way ?
More information about the linux-mtd
mailing list