barebox and hardware_ecc

Nataraj S Narayan natarajsn at gmail.com
Thu Aug 25 00:51:51 EDT 2011


Hi

Does barebox use by default hardware ECC on nand flash ?  I am on an
at91sam9263 board.

A previous mail by Sascha says that barebox uses hardware ecc while
u-boot uses software ecc by default.

After writing a  ubifs using:-

"tftp rootfs.ubifs.nat /dev/ubi0.data " ,

I  am able boot using a kernel that has MTD_NAND_ATMEL_ECC_SOFT,

but not with a kernel that has  MTD_NAND_ATMEL_ECC_HW.

Am I missing something? Tried adding  an ecc_mode in the following,
but in vain:-

static struct memory_platform_data ram_pdata = {
@@ -96,7 +96,12 @@ void at91_add_device_nand(struct atmel_nand_data *data)

        if (!data)
                return;
+/* Nataraj*************/
+
+        data->ecc_base = (void __iomem *)(AT91_BASE_SYS + AT91_ECC0);
+        data->ecc_mode = NAND_ECC_HW;

+/* Nataraj ************/
        csa = at91_sys_read(AT91_MATRIX_EBI0CSA);
        at91_sys_write(AT91_MATRIX_EBI0CSA, csa |
AT91_MATRIX_EBI0_CS3A_SMC_SMARTMEDIA);


May I have some help?

regards

Nataraj



More information about the barebox mailing list