Skip to content

Commit b4dc53e

Browse files
computersforpeacededekind
authored andcommitted
mtd: nand: renumber the reorganized flags in nand.h / bbm.h
After several steps of rearrangement and consolidation, it is probably worth re-sequencing the numbers on some of our affected flags in nand.h and bbm.h. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
1 parent 53d5d88 commit b4dc53e

2 files changed

Lines changed: 15 additions & 14 deletions

File tree

‎include/linux/mtd/bbm.h‎

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,28 +92,29 @@ struct nand_bbt_descr {
9292
* layout or if this information is already purged. Must be used in conjunction
9393
* with NAND_BBT_CREATE.
9494
*/
95-
#define NAND_BBT_CREATE_EMPTY 0x01000000
95+
#define NAND_BBT_CREATE_EMPTY 0x00000400
9696
/* Search good / bad pattern through all pages of a block */
97-
#define NAND_BBT_SCANALLPAGES 0x00000400
97+
#define NAND_BBT_SCANALLPAGES 0x00000800
9898
/* Scan block empty during good / bad block scan */
99-
#define NAND_BBT_SCANEMPTY 0x00000800
99+
#define NAND_BBT_SCANEMPTY 0x00001000
100100
/* Write bbt if neccecary */
101-
#define NAND_BBT_WRITE 0x00001000
101+
#define NAND_BBT_WRITE 0x00002000
102102
/* Read and write back block contents when writing bbt */
103-
#define NAND_BBT_SAVECONTENT 0x00002000
103+
#define NAND_BBT_SAVECONTENT 0x00004000
104104
/* Search good / bad pattern on the first and the second page */
105-
#define NAND_BBT_SCAN2NDPAGE 0x00004000
105+
#define NAND_BBT_SCAN2NDPAGE 0x00008000
106106
/* Search good / bad pattern on the last page of the eraseblock */
107-
#define NAND_BBT_SCANLASTPAGE 0x00008000
108-
/* The nand_bbt_descr was created dynamicaly and must be freed */
109-
#define NAND_BBT_DYNAMICSTRUCT 0x00200000
107+
#define NAND_BBT_SCANLASTPAGE 0x00010000
110108
/*
111109
* Use a flash based bad block table. By default, OOB identifier is saved in
112110
* OOB area. This option is passed to the default bad block table function.
113111
*/
114-
#define NAND_BBT_USE_FLASH 0x00040000
112+
#define NAND_BBT_USE_FLASH 0x00020000
115113
/* Do not store flash based bad block table in OOB area; store it in-band */
116-
#define NAND_BBT_NO_OOB 0x00080000
114+
#define NAND_BBT_NO_OOB 0x00040000
115+
116+
/* The nand_bbt_descr was created dynamicaly and must be freed */
117+
#define NAND_BBT_DYNAMICSTRUCT 0x80000000
117118

118119
/* The maximum number of blocks to scan for a bbt */
119120
#define NAND_BBT_SCAN_MAXBLOCKS 4

‎include/linux/mtd/nand.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,14 @@ typedef enum {
220220

221221
/* Non chip related options */
222222
/* This option skips the bbt scan during initialization. */
223-
#define NAND_SKIP_BBTSCAN 0x00020000
223+
#define NAND_SKIP_BBTSCAN 0x00010000
224224
/*
225225
* This option is defined if the board driver allocates its own buffers
226226
* (e.g. because it needs them DMA-coherent).
227227
*/
228-
#define NAND_OWN_BUFFERS 0x00040000
228+
#define NAND_OWN_BUFFERS 0x00020000
229229
/* Chip may not exist, so silence any errors in scan */
230-
#define NAND_SCAN_SILENT_NODEV 0x00080000
230+
#define NAND_SCAN_SILENT_NODEV 0x00040000
231231

232232
/* Options set by nand scan */
233233
/* Nand scan has allocated controller struct */

0 commit comments

Comments
 (0)