|
|||||||||||||||||||
OOB: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff bd f3 0f 02 90 98 99 00 2e bd 4b 02 59 19 3b 01
Enable NandFlash
in the Scripts rolling menu and press Execute
.
Enable OS PMECC parameters
in the Scripts rolling menu and press Execute
. The default ECC configuration dialog will pop up: Ecc type
: Select pmecc
Number of sectors per page
: Spare size / Sector size
Spare size
: OOB size in bytes
Number of ECC bits required
: Can be 2,4,8,12,24 bits. Set it according to the NAND flash minimum requirement.
Size of the ECC sector
: Can be 512,1024 in bytes. Set it according to the NAND flash minimum requirement.
Ecc offset
: Start position of PMECC encoding data in the OOB area, which is: oob size - (PMECC encode data size * sector number per page)
Trimffs
: If select this option, then SAM-BA will NOT generate PMECC data for all 0xFF data page, since the generated PMECC data for all 0xFF data page are not 0xFF (Except SAMA5D4 chip). This option should be enabled when flash a rootfs in nand if the chip is not SAMA5D4.
#define PMECC_ERROR_CORR_BITS 2 /* Correctable ECC bits, can be 2,4,8,12,24 bits */ #define PMECC_SECTOR_SIZE 512 /* Sector size in bytes, can be 512 or 1024 */
make menuconfig
to configure PMECC parameters make sama5d3xeknf_uboot_defconfig # take SAMA5D3 as an example make menuconfigIn the popup menu, select as following to configure PMECC correctable bits & sector size
Memory selection ---> NAND flash configuration ---> PMECC Configuration ---> PMECC Error Correction Bits (4-bit) ---> PMECC Sector Size (512-byte) --->
Auto-detect ONFI minimum error requirement
option before you set your own pmecc configuration. Then the operation is same as v3.6.0. Memory selection ---> NAND flash configuration ---> PMECC Configuration ---> Auto-detect ONFI minimum error requirement
include/configs/
. /* PMECC & PMERRLOC */ #define CONFIG_ATMEL_NAND_HWECC 1 #define CONFIG_ATMEL_NAND_HW_PMECC 1 #define CONFIG_PMECC_CAP 2 /* Correctable ECC bits, can be 2,4,8,12,24 bits */ #define CONFIG_PMECC_SECTOR_SIZE 512 /* Sector size in bytes, can be 512 or 1024 */ #define CONFIG_PMECC_INDEX_TABLE_OFFSET 0x8000 /* Different sector size has different Index table. If the sector size is 1024, need to change it to 0x10000 */
CONFIG_PMECC_CAP
and CONFIG_PMECC_SECTOR_SIZE
.
atmel,pmecc-cap
and atmel,pmecc-sector-size
in the dt node.
arch/arm/boot/dts/
at91sam9x5cm.dtsi
at91sam9n12ek.dts
sama5d3cm.dtsi
nand-ecc-mode = "hw"; atmel,has-pmecc; /* Enable PMECC */ atmel,pmecc-cap = <2>; /* Correctable ECC bits, can be 2,4,8,12,24 bits */ atmel,pmecc-sector-size = <512>; /* Sector size in bytes, can be 512, 1024 */
atmel_nand 40000000.nand: Initialize PMECC params, cap: 2, sector: 512In the U-Boot, to see the PMECC information you need enable the MTD debug in the board config file. For example, in SAMA5D3 need to add the following lines in
include/configs/sama5d3xek.h
, then rebuild the U-Boot.bin.
#define CONFIG_MTD_DEBUG #define CONFIG_MTD_DEBUG_VERBOSE 1
WebFaqBaseForm | |
---|---|
Boards | Sama5d4Xplained, Sama5d4ek, Sama5d3Xplained, Sama5d3xek |
Components | |
Summary | About PMECC configuration |
|
|||||||||||||||||||||||||||||||||||||||||||
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Microchip and others, are registered trademarks or trademarks of Microchip Technology Inc. and its subsidiaries.
Arm® and others are registered trademarks or trademarks of Arm Limited (or its affiliates). Other terms and product names may be trademarks of others.
Ideas, requests, contributions ? Connect to LinksToCommunities page.