Bad block table related constants
Prev | Chapter 8. Constants | Next

## Bad block table related constants

These constants describe the options used for bad block table descriptors.

    /* Options for the bad block table descriptors */

    /* The number of bits used per block in the bbt on the device */
    #define NAND_BBT_NRBITS_MSK	0x0000000F
    #define NAND_BBT_1BIT		0x00000001
    #define NAND_BBT_2BIT		0x00000002
    #define NAND_BBT_4BIT		0x00000004
    #define NAND_BBT_8BIT		0x00000008
    /* The bad block table is in the last good block of the device */
    #define	NAND_BBT_LASTBLOCK	0x00000010
    /* The bbt is at the given page, else we must scan for the bbt */
    #define NAND_BBT_ABSPAGE	0x00000020
    /* The bbt is at the given page, else we must scan for the bbt */
    #define NAND_BBT_SEARCH		0x00000040
    /* bbt is stored per chip on multichip devices */
    #define NAND_BBT_PERCHIP	0x00000080
    /* bbt has a version counter at offset veroffs */
    #define NAND_BBT_VERSION	0x00000100
    /* Create a bbt if none axists */
    #define NAND_BBT_CREATE		0x00000200
    /* Search good / bad pattern through all pages of a block */
    #define NAND_BBT_SCANALLPAGES	0x00000400
    /* Scan block empty during good / bad block scan */
    #define NAND_BBT_SCANEMPTY	0x00000800
    /* Write bbt if neccecary */
    #define NAND_BBT_WRITE		0x00001000
    /* Read and write back block contents when writing bbt */
    #define NAND_BBT_SAVECONTENT	0x00002000

Prev | Up | Next
Hardware control related constants | Home | Chapter 9. Structures