Hi,
I am new to linux environment and I am working on DRA7xx rev G board with GLSDK 6.10.
I have been trying to access NAND flash on DRA7xx. I have applied patches and made it accessible.
I am able to write into NAND and read from it at Uboot stage using the following commands.
mw.b 82000000 55 100
nand write 82000000 0 100
mw.b 82000000 0 100
nand read 82000000 0 100
md.b 82000000 100
I am able to what I have written on NAND.
Same way I am able to read this data from user space also(after kernal boot up) either using nanddump command or using some small user application with open, read calls.
And I am able to write and read data to NAND flash at user space uisng write and read calls.(I am taking care of page writing and erasing etc.)
1. But, my problem is when I write into NAND flash at user space using write call and trying to read that data from Uboot(after rebooting) I am unable to access it.
The error I am getting on terminal is as follows.
DRA752 EVM # nand read 82000000 0 100
NAND read: device 0 offset 0x0, size 0x100
NAND READ from offset 0 failed -74
0 bytes read: ERROR
What could be the reason.? Please help me. Is there any thing wrong with my code?
2. And what is the ECC mechanism that used in Kernal space and Uboot level.? I read that there are several Error checking mechanisms available for NAND flash.
3. I have written Images such as MLO, u-boot.img, boot.scr, dra7xx-evm.dtb,uImage etc to NAND using the commands such as
mmc rescan
nand erase.chip
load mmc 0 0x81000000 MLO
nand write 0x81000000 0 20000
nand write 0x81000000 20000 20000
nand write 0x81000000 40000 20000
nand write 0x81000000 60000 20000
load mmc 0 0x81000000 u-boot.img
nand write 0x81000000 80000 1e0000
load mmc 0 0x81000000 uImage
nand write 0x81000000 280000 500000
load mmc 0 0x81000000 dra7-evm-lcd10.dtb
nand write 0x81000000 780000 f880000
The images were written fine. But if I am trying boot from NAND keeping the sysboot pins as per NAND boot selection, the booting is not happening(not even til uboot.). Please suggest me how to boot from NAND on DRA7xx.
(Ref: processors.wiki.ti.com/.../Linux_Core_U-Boot_User%27s_Guide)
The patches provided by TI are not having full information. I needed to enable lot of other macros in the code.
Please help me.
Thanks in anticipation.
Regards,
Vijaykumar P