Boot Control Block Management - Freescale Semiconductor i.MX 6Solo Reference Manual

Linux
Table of Contents

Advertisement

Chapter 30 NAND GPMI Flash Driver

30.2.3 Boot Control Block Management

During startup, the NAND driver scans the first block for the presence of a NAND
Control Block (NCB). Its presence is detected by magic signatures. When a signature is
found, the boot block candidate is checked for errors using Hamming code. If errors are
found, they are fixed, if possible. If the NCB is found, it is parsed to retrieve timings for
the NAND chip.
All boot control blocks are created when formatting the medium using the user space
application kobs-ng .
30.2.4 Bad Block Handling
When the driver begins, by default, it builds the bad block table. It is possible to
determine if a block is bad, dynamically, but to improve performance it is done at boot
time. The badness of the erase block is determined by checking a pattern in the beginning
of the spare area on each page of the block. However, if the chip uses hardware error
correction, the bad marks falls into the ECC bytes area. Therefore, if hardware error
correction is used, the bad block mark should be moved. The driver decides if bad block
marks should be moved if there is no NAND control block. Then, to prevent another
move of bad block marks, the driver writes the default NCB to the Flash.
The following functions that deal with bad block handling are grouped together in the
gpmi-nfc-mil.c file:
mil_block_bad
mil_scan_bbt
30.3 Source Code Structure
The NAND driver is located in the drivers/mtd/nand/gpmi-nfc directory.
The following files are included in the NAND driver:
gpmi-nfc.c
hal-mx50.c
hal-mxs.c
gpmi-nfc.h
gpmi-regs.h
bch-regs.h
gpmi-regs-mx50.h
bch-regs-mx50.h
i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013
Freescale Semiconductor, Inc.
223

Advertisement

Table of Contents
loading

This manual is also suitable for:

I.mx 6duallite

Table of Contents