ndfc ecc byte order
Stefan Roese
sr at denx.de
Thu Jan 31 08:01:04 EST 2008
On Wednesday 30 January 2008, Sean MacLennan wrote:
> There seems to be a byte order conflict between the u-boot and Linux
> ndfc drivers.
>
> u-boot has the following:
>
> /* The NDFC uses Smart Media (SMC) bytes order*/
> ecc_code[0] = p[2];
> ecc_code[1] = p[1];
> ecc_code[2] = p[3];
>
> the kernel has:
>
> ecc_code[0] = p[1];
> ecc_code[1] = p[2];
> ecc_code[2] = p[3];
>
> I think u-boot has it right since u-boot and kernel software calculated
> ECCs agree. Anybody know a reason *not* to switch to the SMC byte order?
Please take a look at Kconfig
config MTD_NAND_NDFC
tristate "NDFC NanD Flash Controller"
depends on 4xx && !PPC_MERGE
select MTD_NAND_ECC_SMC
So the SMC byte ordering is selected and it should match the version used in
U-Boot. In Linux the swapping is done in nand_ecc.c.
So it should work correctly in the current configuration. At least I didn't
notice any problems on all the 4xx platforms I used till now.
Best regards,
Stefan
More information about the Linuxppc-dev
mailing list