Hi
I'm a little bit confused about how to configure ECC of AM1808 for NAND devices. NAND device in question is:
SAMSUNG K9K8G08U1A-I
- Page Program : (2K + 64)Byte
- Block Erase : (128K + 4K)Byte
By default, DaVinci-PSP-SDK-03.20.00.06 is configured in terms of NAND ECC as follows:
U-Boot:
#undef CONFIG_SYS_NAND_HW_ECC
#define CONFIG_SYS_NAND_4BIT_HW_ECC
#define CONFIG_SYS_NAND_USE_FLASH_BBT
#define CFG_DAVINCI_STD_NAND_LAYOUT
Linux:
static struct davinci_nand_pdata da850_evm_nandflash_data = {
.parts = da850_evm_nandflash_partition,
.nr_parts = ARRAY_SIZE(da850_evm_nandflash_partition),
.ecc_mode = NAND_ECC_HW,
.ecc_bits = 4,
.options = NAND_USE_FLASH_BBT,
};
However, it turns out that these definitions are not compatible with each other. When I flash a JFFS2 root filesystem on the NAND device, mounting it fails.
so I have 3 choices
1.turn off the ecc in the kernel (NAND_ECC_NONE), but I don't kown the reliability about that.
when boot, print JFFS2 notice: (360) check_node_data: wrong data CRC in data node at 0x0123c2a0: read 0x6744115c, calculated 0xb99813ff.
Bad block table not found for chip 0 , Empty flash at 0x018f2010 ends at 0x018f2800 etc..
2.change kernel to NAND_ECC_HW_SYNDROME (because I see .ecc_mode = NAND_ECC_HW_SYNDROME after #define CONFIG_SYS_NAND_4BIT_HW_ECC),
but I found that NAND_ECC_HW_SYNDROME mode have not been realized in the kernel source .
3.change uboot to CONFIG_SYS_NAND_HW_ECC (I have not done that ,)
could somebody give me some advice.
And another question is : can I update uboot from uboot ?
Linux and U-Boot codes are based on DaVinci-PSP-SDK-03.20.00.06 software. Were there any patches in the more recent versions?
Regards
fahon