hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/include/linux/mtd/bbm.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * NAND family Bad Block Management (BBM) header file
34 * - Bad Block Table (BBT) implementation
....@@ -7,21 +8,6 @@
78 *
89 * Copyright © 2000-2005
910 * Thomas Gleixner <tglx@linuxtronix.de>
10
- *
11
- * This program is free software; you can redistribute it and/or modify
12
- * it under the terms of the GNU General Public License as published by
13
- * the Free Software Foundation; either version 2 of the License, or
14
- * (at your option) any later version.
15
- *
16
- * This program is distributed in the hope that it will be useful,
17
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
- * GNU General Public License for more details.
20
- *
21
- * You should have received a copy of the GNU General Public License
22
- * along with this program; if not, write to the Free Software
23
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
- *
2511 */
2612 #ifndef __LINUX_MTD_BBM_H
2713 #define __LINUX_MTD_BBM_H
....@@ -93,10 +79,7 @@
9379 #define NAND_BBT_WRITE 0x00002000
9480 /* Read and write back block contents when writing bbt */
9581 #define NAND_BBT_SAVECONTENT 0x00004000
96
-/* Search good / bad pattern on the first and the second page */
97
-#define NAND_BBT_SCAN2NDPAGE 0x00008000
98
-/* Search good / bad pattern on the last page of the eraseblock */
99
-#define NAND_BBT_SCANLASTPAGE 0x00010000
82
+
10083 /*
10184 * Use a flash based bad block table. By default, OOB identifier is saved in
10285 * OOB area. This option is passed to the default bad block table function.
....@@ -115,20 +98,13 @@
11598
11699 /*
117100 * Flag set by nand_create_default_bbt_descr(), marking that the nand_bbt_descr
118
- * was allocated dynamicaly and must be freed in nand_release(). Has no meaning
101
+ * was allocated dynamicaly and must be freed in nand_cleanup(). Has no meaning
119102 * in nand_chip.bbt_options.
120103 */
121104 #define NAND_BBT_DYNAMICSTRUCT 0x80000000
122105
123106 /* The maximum number of blocks to scan for a bbt */
124107 #define NAND_BBT_SCAN_MAXBLOCKS 4
125
-
126
-/*
127
- * Constants for oob configuration
128
- */
129
-#define NAND_SMALL_BADBLOCK_POS 5
130
-#define NAND_LARGE_BADBLOCK_POS 0
131
-#define ONENAND_BADBLOCK_POS 0
132108
133109 /*
134110 * Bad block scanning errors
....@@ -140,7 +116,6 @@
140116 /**
141117 * struct bbm_info - [GENERIC] Bad Block Table data structure
142118 * @bbt_erase_shift: [INTERN] number of address bits in a bbt entry
143
- * @badblockpos: [INTERN] position of the bad block marker in the oob area
144119 * @options: options for this descriptor
145120 * @bbt: [INTERN] bad block table pointer
146121 * @isbad_bbt: function to determine if a block is bad
....@@ -150,7 +125,6 @@
150125 */
151126 struct bbm_info {
152127 int bbt_erase_shift;
153
- int badblockpos;
154128 int options;
155129
156130 uint8_t *bbt;