History

mtd: rawnand: Reorder the nand_chip->options flags

These flags are in a strange order, reorder the list, add spaces when it is relevant, pack definitions that are related. There is no functional change.

Miquel Raynal committed 6 years ago

Commit 96d627b1 parent dd6ed5c1 file · +30 −27Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/mtd/rawnand.h+30−27
@@ -118,20 +118,25 @@ enum nand_ecc_algo { · 117 unmodified lines
118#define NAND_ECC_GENERIC_ERASED_CHECK BIT(0)118#define NAND_ECC_GENERIC_ERASED_CHECK BIT(0)
119#define NAND_ECC_MAXIMIZE BIT(1)119#define NAND_ECC_MAXIMIZE BIT(1)
120 120
121/*
122 * When using software implementation of Hamming, we can specify which byte
123 * ordering should be used.
124 */
125#define NAND_ECC_SOFT_HAMMING_SM_ORDER BIT(2)
126
127/*121/*
128 * Option constants for bizarre disfunctionality and real122 * Option constants for bizarre disfunctionality and real
129 * features.123 * features.
130 */124 */
125
131/* Buswidth is 16 bit */126/* Buswidth is 16 bit */
132#define NAND_BUSWIDTH_16 BIT(1)127#define NAND_BUSWIDTH_16 BIT(1)
128
129/*
130 * When using software implementation of Hamming, we can specify which byte
131 * ordering should be used.
132 */
133#define NAND_ECC_SOFT_HAMMING_SM_ORDER BIT(2)
134
133/* Chip has cache program function */135/* Chip has cache program function */
134#define NAND_CACHEPRG BIT(3)136#define NAND_CACHEPRG BIT(3)
137/* Options valid for Samsung large page devices */
138#define NAND_SAMSUNG_LP_OPTIONS NAND_CACHEPRG
139
135/*140/*
136 * Chip requires ready check on read (for auto-incremented sequential read).141 * Chip requires ready check on read (for auto-incremented sequential read).
137 * True only for small page devices; large page devices do not support142 * True only for small page devices; large page devices do not support
@@ -150,6 +155,8 @@ enum nand_ecc_algo { · 12 unmodified lines
150 155
151/* Device supports subpage reads */156/* Device supports subpage reads */
152#define NAND_SUBPAGE_READ BIT(12)157#define NAND_SUBPAGE_READ BIT(12)
158/* Macros to identify the above */
159#define NAND_HAS_SUBPAGE_READ(chip) ((chip->options & NAND_SUBPAGE_READ))
153 160
154/*161/*
155 * Some MLC NANDs need data scrambling to limit bitflips caused by repeated162 * Some MLC NANDs need data scrambling to limit bitflips caused by repeated
@@ -160,32 +167,12 @@ enum nand_ecc_algo { · 4 unmodified lines
160/* Device needs 3rd row address cycle */167/* Device needs 3rd row address cycle */
161#define NAND_ROW_ADDR_3 BIT(14)168#define NAND_ROW_ADDR_3 BIT(14)
162 169
163/* Options valid for Samsung large page devices */
164#define NAND_SAMSUNG_LP_OPTIONS NAND_CACHEPRG
165
166/* Macros to identify the above */
167#define NAND_HAS_SUBPAGE_READ(chip) ((chip->options & NAND_SUBPAGE_READ))
168
169/*
170 * There are different places where the manufacturer stores the factory bad
171 * block markers.
172 *
173 * Position within the block: Each of these pages needs to be checked for a
174 * bad block marking pattern.
175 */
176#define NAND_BBM_FIRSTPAGE BIT(24)
177#define NAND_BBM_SECONDPAGE BIT(25)
178#define NAND_BBM_LASTPAGE BIT(26)
179
180/* Position within the OOB data of the page */
181#define NAND_BBM_POS_SMALL 5
182#define NAND_BBM_POS_LARGE 0
183
184/* Non chip related options */170/* Non chip related options */
185/* This option skips the bbt scan during initialization. */171/* This option skips the bbt scan during initialization. */
186#define NAND_SKIP_BBTSCAN BIT(16)172#define NAND_SKIP_BBTSCAN BIT(16)
187/* Chip may not exist, so silence any errors in scan */173/* Chip may not exist, so silence any errors in scan */
188#define NAND_SCAN_SILENT_NODEV BIT(18)174#define NAND_SCAN_SILENT_NODEV BIT(18)
175
189/*176/*
190 * Autodetect nand buswidth with readid/onfi.177 * Autodetect nand buswidth with readid/onfi.
191 * This suppose the driver will configure the hardware in 8 bits mode178 * This suppose the driver will configure the hardware in 8 bits mode
@@ -193,6 +180,7 @@ enum nand_ecc_algo { · 1 unmodified line
193 * before calling nand_scan_tail.180 * before calling nand_scan_tail.
194 */181 */
195#define NAND_BUSWIDTH_AUTO BIT(19)182#define NAND_BUSWIDTH_AUTO BIT(19)
183
196/*184/*
197 * This option could be defined by controller drivers to protect against185 * This option could be defined by controller drivers to protect against
198 * kmap'ed, vmalloc'ed highmem buffers being passed from upper layers186 * kmap'ed, vmalloc'ed highmem buffers being passed from upper layers
@@ -222,11 +210,26 @@ enum nand_ecc_algo { · 23 unmodified lines
222 */210 */
223#define NAND_KEEP_TIMINGS BIT(23)211#define NAND_KEEP_TIMINGS BIT(23)
224 212
213/*
214 * There are different places where the manufacturer stores the factory bad
215 * block markers.
216 *
217 * Position within the block: Each of these pages needs to be checked for a
218 * bad block marking pattern.
219 */
220#define NAND_BBM_FIRSTPAGE BIT(24)
221#define NAND_BBM_SECONDPAGE BIT(25)
222#define NAND_BBM_LASTPAGE BIT(26)
223
225/* Cell info constants */224/* Cell info constants */
226#define NAND_CI_CHIPNR_MSK 0x03225#define NAND_CI_CHIPNR_MSK 0x03
227#define NAND_CI_CELLTYPE_MSK 0x0C226#define NAND_CI_CELLTYPE_MSK 0x0C
228#define NAND_CI_CELLTYPE_SHIFT 2227#define NAND_CI_CELLTYPE_SHIFT 2
229 228
229/* Position within the OOB data of the page */
230#define NAND_BBM_POS_SMALL 5
231#define NAND_BBM_POS_LARGE 0
232
230/**233/**
231 * struct nand_parameters - NAND generic parameters from the parameter page234 * struct nand_parameters - NAND generic parameters from the parameter page
232 * @model: Model name235 * @model: Model name

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t