Recent work summary (drive by NAND-B/C)

Source: Internet
Author: User

After the driver of the NANDXX-A is done, start adding something for the NANDXXX-B/C and fix the previous issue.

Phase1:
1) Add struct nand_ecclayout stnand_oob_64;
2) Add omap_nand_command_lp ();
3) modify the probe () function;
4) add struct nand_platform_data osk5912_nand_data;
To change the NAND Flash type, You Need To Change macro in the following two ways:
# Define st_nand_sp in osk-nand-flash.c"
# Define st_nand_sp in board-osk.c"
Result: The Flash ID can be identified.
Note: The manfactureid output of 516 batches of NAND is incorrect. 0x20 is output in the last byte and cannot be identified;
Question:
1) When MTD util is used to execute R/W/e, errors are often encountered and unstable;
2) Bad block management of jffs2 may be faulty-for a bad block, read 0x1985 of OOB and cannot be tested after mounting;

Phase2:
1) debug the driver:
A) Modify nfc_init ();
B) Remove the value assignment of the dev_ready function;
C) Write test case to operate flash;
Then I found that the NAND operation is OK and it is normal to change a and B back. Is it MTD util? However, at least flash_eraseall can be used, and other tools such as nanddump may disrupt the internal timing of NAND.
2) Compile yaffs2 to the Linux kernel:
A) download the latest yaffs2 SRC code from http://www.aleph1.co.uk/cgi-bin/viewcvs.cgi;
B) send the yaffs2 patch to the Linux kernel according to readme. Patch;
C) Select yaffs2 when making menuconfig. For more information, see http://www.edacn.net/html/83/38783_itemid_7409.html;
D) I encountered a problem during compilation. I don't know why I can post it? It is estimated that there will be more updates, and these issues should be fixed:
1. missing file yaffs_mtdif1.h
You can write a header file yaffs_mtdif1.h with reference to yaffs_mtdif2.h
2. Replace qsort (...) in yaffs_guts.c with yaffs_qsort (...)
3. Modify makefile from
--------------------------------------------------
Yaffs-y + = yaffs_packedtags2.o yaffs_nand.o yaffs_qsort.o
Yaffs-y + = yaffs_tagscompat.o yaffs_tagsvalidity.o
Yaffs-y + = yaffs_mtdif.o yaffs_mtdif2.o
--------------------------------------------------
To
--------------------------------------------------
Yaffs-y + = yaffs_packedtags1.o yaffs_packedtags2.o yaffs_nand.o yaffs_qsort.o
Yaffs-y + = yaffs_tagscompat.o yaffs_tagsvalidity.o
Yaffs-y + = yaffs_mtdif.o yaffs_mtdif1.o yaffs_mtdif2.o
--------------------------------------------------
3) set the kernel options related to NAND to M, saving the need to re-compile the kernel if you want to add debug information;
4) use nand flash:
A) after the kernel is compiled, CP nand_ecc.ko nand_ids.ko st_512byte_ecc.ko NAND. Ko osk-nand-flash.ko/data/rootfs2.6/root /;
B) In the osk console, choose "insmod them;
C) if you want a clean flash, run./flash_eraseall/dev/mtd4;
D) Mount-T yaffs2/dev/mtdblock4/MNT;

Phase 3:
1) Complete the nandxxx-C driver and test the R/W file in yaffs2.
A) add an nand_st_mlc_options value to the board-osk.c;
B) In the osk-nand-flash.c "# define st_nand_mlc" and the board-osk.c "# define st_nand_mlc ";
C) change the frequency in nfc_init () from 0 to 1;
2) Change lp_options in nand_ids.c to 0 -- the options we want are all defined;

Others:
======================================
Modify the previous modification to oob_place;
Read/read_oob returns the content of the entire OOB. nftl knows which locations (ecc pos) are useless to it.

Nftl manages BBM by itself, so the action on bad block in LLD should be blocked;
If you do not want MTD to manage BBM but nftl, then:
A) assign values to chip> block_bad and chip> block_markbad in the osk-flash.c, and do nothing;
B) The badblock position in oob_layout should be free;
C) do not use the bbt provided by UBI;
Disadvantage: in this way, badblk cannot be identified/marked in the underlying NAND operation, because the returned results are not bad blocks.

The BBM processing of MLC in nftl does not comply with the standard;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.