1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Bad block table related constants</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="MTD NAND Driver Programming Interface"><link rel="up" href="defines.html" title="Chapter&#160;8.&#160;Constants"><link rel="prev" href="Hardware_control_related_constants.html" title="Hardware control related constants"><link rel="next" href="structs.html" title="Chapter&#160;9.&#160;Structures"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Bad block table related constants</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="Hardware_control_related_constants.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;8.&#160;Constants</th><td width="20%" align="right">&#160;<a accesskey="n" href="structs.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="Bad_block_table_constants"></a>Bad block table related constants</h2></div></div></div><p>
2	These constants describe the options used for bad block
3	table descriptors.
4  	</p><pre class="programlisting">
5/* Options for the bad block table descriptors */
6
7/* The number of bits used per block in the bbt on the device */
8#define NAND_BBT_NRBITS_MSK	0x0000000F
9#define NAND_BBT_1BIT		0x00000001
10#define NAND_BBT_2BIT		0x00000002
11#define NAND_BBT_4BIT		0x00000004
12#define NAND_BBT_8BIT		0x00000008
13/* The bad block table is in the last good block of the device */
14#define	NAND_BBT_LASTBLOCK	0x00000010
15/* The bbt is at the given page, else we must scan for the bbt */
16#define NAND_BBT_ABSPAGE	0x00000020
17/* bbt is stored per chip on multichip devices */
18#define NAND_BBT_PERCHIP	0x00000080
19/* bbt has a version counter at offset veroffs */
20#define NAND_BBT_VERSION	0x00000100
21/* Create a bbt if none axists */
22#define NAND_BBT_CREATE		0x00000200
23/* Write bbt if necessary */
24#define NAND_BBT_WRITE		0x00001000
25/* Read and write back block contents when writing bbt */
26#define NAND_BBT_SAVECONTENT	0x00002000
27	</pre><p>
28	</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="Hardware_control_related_constants.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="defines.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="structs.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Hardware control related constants&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Chapter&#160;9.&#160;Structures</td></tr></table></div></body></html>
29