Hi,
I have been trying to sort out the nand bad block issues using the at91sam9260ek board.
My ultimate goal is to be able to alter the U-boot environment from linux using the fw_setenv/fw_printenv tools.
Any data I write with SAM-BA is considered a bad block under linux at boot up. I think this is because SAM-BA is writing the bad block information in the wrong location, or writing the ECC information where the bad block information should be (first byte of spare area on large page)
I am also trying to get U-boot to operate on the nand flash, but it always gets a timeout for erase and write operations. Read operations seems to work ok.
Quote:
nand erase 0x60000 0x20000
NAND erase: device 0 offset 0x60000, size 0x20000
nand_isbad_bbt(): bbt info for offs 0x00060000: (block 0) 0x03
nand_erase: start = 0x00060000, len = 131072
nand_isbad_bbt(): bbt info for offs 0x00060000: (block 0) 0x03
Timeout!nand_erase: Failed erase, page 0x000000c0
NAND 256MiB 3,3V 8-bit: MTD Erase failure: -5
OK
I'm using u-boot-1.2, linux 2.6.21.1
Has anyone managed to get nand working correctly under u-boot and linux?
U-boot defines the bad block offset as 5, which i think is incorrect for a large page device, I have changed this to 0. This then conflicts with soemthing SAM-BA writes.
Maybe the tming is incorrect for the erase operations. However it seems the same as mtd under linux which erases/reads/writes fine (on areas not written by SAM-BA)
Any suggestions?
Thanks
Chris