diff options
author | Dong, Chuanxiao <chuanxiao.dong@intel.com> | 2010-07-21 13:32:26 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-08-02 04:09:34 -0400 |
commit | 6ea9ad24186d1242320bf02082e02c8c5a8073be (patch) | |
tree | 384df8c3de25a54cf04634da92567698e6990ad2 | |
parent | 1c3275b656045aff9a75bb2c9f3251af1043ebb3 (diff) |
mtd: denali.h: fixed checkpatch errors
Fix all checkpatch.pl complaints.
Artem: tweaked a little and fix tab indentations, so now this is not
only about checkpatch, but also about making indentations look
sane.
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r-- | drivers/mtd/nand/denali.h | 160 |
1 files changed, 78 insertions, 82 deletions
diff --git a/drivers/mtd/nand/denali.h b/drivers/mtd/nand/denali.h index 422a29ab2f60..b56fa3c7c166 100644 --- a/drivers/mtd/nand/denali.h +++ b/drivers/mtd/nand/denali.h | |||
@@ -17,7 +17,7 @@ | |||
17 | * | 17 | * |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/mtd/nand.h> | 20 | #include <linux/mtd/nand.h> |
21 | 21 | ||
22 | #define DEVICE_RESET 0x0 | 22 | #define DEVICE_RESET 0x0 |
23 | #define DEVICE_RESET__BANK0 0x0001 | 23 | #define DEVICE_RESET__BANK0 0x0001 |
@@ -29,7 +29,7 @@ | |||
29 | #define TRANSFER_SPARE_REG__FLAG 0x0001 | 29 | #define TRANSFER_SPARE_REG__FLAG 0x0001 |
30 | 30 | ||
31 | #define LOAD_WAIT_CNT 0x20 | 31 | #define LOAD_WAIT_CNT 0x20 |
32 | #define LOAD_WAIT_CNT__VALUE 0xffff | 32 | #define LOAD_WAIT_CNT__VALUE 0xffff |
33 | 33 | ||
34 | #define PROGRAM_WAIT_CNT 0x30 | 34 | #define PROGRAM_WAIT_CNT 0x30 |
35 | #define PROGRAM_WAIT_CNT__VALUE 0xffff | 35 | #define PROGRAM_WAIT_CNT__VALUE 0xffff |
@@ -83,7 +83,7 @@ | |||
83 | #define RE_2_WE 0x120 | 83 | #define RE_2_WE 0x120 |
84 | #define RE_2_WE__VALUE 0x003f | 84 | #define RE_2_WE__VALUE 0x003f |
85 | 85 | ||
86 | #define ACC_CLKS 0x130 | 86 | #define ACC_CLKS 0x130 |
87 | #define ACC_CLKS__VALUE 0x000f | 87 | #define ACC_CLKS__VALUE 0x000f |
88 | 88 | ||
89 | #define NUMBER_OF_PLANES 0x140 | 89 | #define NUMBER_OF_PLANES 0x140 |
@@ -140,7 +140,7 @@ | |||
140 | #define DEVICES_CONNECTED 0x250 | 140 | #define DEVICES_CONNECTED 0x250 |
141 | #define DEVICES_CONNECTED__VALUE 0x0007 | 141 | #define DEVICES_CONNECTED__VALUE 0x0007 |
142 | 142 | ||
143 | #define DIE_MASK 0x260 | 143 | #define DIE_MASK 0x260 |
144 | #define DIE_MASK__VALUE 0x00ff | 144 | #define DIE_MASK__VALUE 0x00ff |
145 | 145 | ||
146 | #define FIRST_BLOCK_OF_NEXT_PLANE 0x270 | 146 | #define FIRST_BLOCK_OF_NEXT_PLANE 0x270 |
@@ -152,7 +152,7 @@ | |||
152 | #define RE_2_RE 0x290 | 152 | #define RE_2_RE 0x290 |
153 | #define RE_2_RE__VALUE 0x003f | 153 | #define RE_2_RE__VALUE 0x003f |
154 | 154 | ||
155 | #define MANUFACTURER_ID 0x300 | 155 | #define MANUFACTURER_ID 0x300 |
156 | #define MANUFACTURER_ID__VALUE 0x00ff | 156 | #define MANUFACTURER_ID__VALUE 0x00ff |
157 | 157 | ||
158 | #define DEVICE_ID 0x310 | 158 | #define DEVICE_ID 0x310 |
@@ -173,13 +173,13 @@ | |||
173 | #define LOGICAL_PAGE_SPARE_SIZE 0x360 | 173 | #define LOGICAL_PAGE_SPARE_SIZE 0x360 |
174 | #define LOGICAL_PAGE_SPARE_SIZE__VALUE 0xffff | 174 | #define LOGICAL_PAGE_SPARE_SIZE__VALUE 0xffff |
175 | 175 | ||
176 | #define REVISION 0x370 | 176 | #define REVISION 0x370 |
177 | #define REVISION__VALUE 0xffff | 177 | #define REVISION__VALUE 0xffff |
178 | 178 | ||
179 | #define ONFI_DEVICE_FEATURES 0x380 | 179 | #define ONFI_DEVICE_FEATURES 0x380 |
180 | #define ONFI_DEVICE_FEATURES__VALUE 0x003f | 180 | #define ONFI_DEVICE_FEATURES__VALUE 0x003f |
181 | 181 | ||
182 | #define ONFI_OPTIONAL_COMMANDS 0x390 | 182 | #define ONFI_OPTIONAL_COMMANDS 0x390 |
183 | #define ONFI_OPTIONAL_COMMANDS__VALUE 0x003f | 183 | #define ONFI_OPTIONAL_COMMANDS__VALUE 0x003f |
184 | 184 | ||
185 | #define ONFI_TIMING_MODE 0x3a0 | 185 | #define ONFI_TIMING_MODE 0x3a0 |
@@ -201,12 +201,12 @@ | |||
201 | #define FEATURES 0x3f0 | 201 | #define FEATURES 0x3f0 |
202 | #define FEATURES__N_BANKS 0x0003 | 202 | #define FEATURES__N_BANKS 0x0003 |
203 | #define FEATURES__ECC_MAX_ERR 0x003c | 203 | #define FEATURES__ECC_MAX_ERR 0x003c |
204 | #define FEATURES__DMA 0x0040 | 204 | #define FEATURES__DMA 0x0040 |
205 | #define FEATURES__CMD_DMA 0x0080 | 205 | #define FEATURES__CMD_DMA 0x0080 |
206 | #define FEATURES__PARTITION 0x0100 | 206 | #define FEATURES__PARTITION 0x0100 |
207 | #define FEATURES__XDMA_SIDEBAND 0x0200 | 207 | #define FEATURES__XDMA_SIDEBAND 0x0200 |
208 | #define FEATURES__GPREG 0x0400 | 208 | #define FEATURES__GPREG 0x0400 |
209 | #define FEATURES__INDEX_ADDR 0x0800 | 209 | #define FEATURES__INDEX_ADDR 0x0800 |
210 | 210 | ||
211 | #define TRANSFER_MODE 0x400 | 211 | #define TRANSFER_MODE 0x400 |
212 | #define TRANSFER_MODE__VALUE 0x0003 | 212 | #define TRANSFER_MODE__VALUE 0x0003 |
@@ -235,12 +235,12 @@ | |||
235 | #define INTR_EN0__DMA_CMD_COMP 0x0004 | 235 | #define INTR_EN0__DMA_CMD_COMP 0x0004 |
236 | #define INTR_EN0__TIME_OUT 0x0008 | 236 | #define INTR_EN0__TIME_OUT 0x0008 |
237 | #define INTR_EN0__PROGRAM_FAIL 0x0010 | 237 | #define INTR_EN0__PROGRAM_FAIL 0x0010 |
238 | #define INTR_EN0__ERASE_FAIL 0x0020 | 238 | #define INTR_EN0__ERASE_FAIL 0x0020 |
239 | #define INTR_EN0__LOAD_COMP 0x0040 | 239 | #define INTR_EN0__LOAD_COMP 0x0040 |
240 | #define INTR_EN0__PROGRAM_COMP 0x0080 | 240 | #define INTR_EN0__PROGRAM_COMP 0x0080 |
241 | #define INTR_EN0__ERASE_COMP 0x0100 | 241 | #define INTR_EN0__ERASE_COMP 0x0100 |
242 | #define INTR_EN0__PIPE_CPYBCK_CMD_COMP 0x0200 | 242 | #define INTR_EN0__PIPE_CPYBCK_CMD_COMP 0x0200 |
243 | #define INTR_EN0__LOCKED_BLK 0x0400 | 243 | #define INTR_EN0__LOCKED_BLK 0x0400 |
244 | #define INTR_EN0__UNSUP_CMD 0x0800 | 244 | #define INTR_EN0__UNSUP_CMD 0x0800 |
245 | #define INTR_EN0__INT_ACT 0x1000 | 245 | #define INTR_EN0__INT_ACT 0x1000 |
246 | #define INTR_EN0__RST_COMP 0x2000 | 246 | #define INTR_EN0__RST_COMP 0x2000 |
@@ -253,7 +253,7 @@ | |||
253 | #define ERR_PAGE_ADDR0 0x440 | 253 | #define ERR_PAGE_ADDR0 0x440 |
254 | #define ERR_PAGE_ADDR0__VALUE 0xffff | 254 | #define ERR_PAGE_ADDR0__VALUE 0xffff |
255 | 255 | ||
256 | #define ERR_BLOCK_ADDR0 0x450 | 256 | #define ERR_BLOCK_ADDR0 0x450 |
257 | #define ERR_BLOCK_ADDR0__VALUE 0xffff | 257 | #define ERR_BLOCK_ADDR0__VALUE 0xffff |
258 | 258 | ||
259 | #define INTR_STATUS1 0x460 | 259 | #define INTR_STATUS1 0x460 |
@@ -280,12 +280,12 @@ | |||
280 | #define INTR_EN1__DMA_CMD_COMP 0x0004 | 280 | #define INTR_EN1__DMA_CMD_COMP 0x0004 |
281 | #define INTR_EN1__TIME_OUT 0x0008 | 281 | #define INTR_EN1__TIME_OUT 0x0008 |
282 | #define INTR_EN1__PROGRAM_FAIL 0x0010 | 282 | #define INTR_EN1__PROGRAM_FAIL 0x0010 |
283 | #define INTR_EN1__ERASE_FAIL 0x0020 | 283 | #define INTR_EN1__ERASE_FAIL 0x0020 |
284 | #define INTR_EN1__LOAD_COMP 0x0040 | 284 | #define INTR_EN1__LOAD_COMP 0x0040 |
285 | #define INTR_EN1__PROGRAM_COMP 0x0080 | 285 | #define INTR_EN1__PROGRAM_COMP 0x0080 |
286 | #define INTR_EN1__ERASE_COMP 0x0100 | 286 | #define INTR_EN1__ERASE_COMP 0x0100 |
287 | #define INTR_EN1__PIPE_CPYBCK_CMD_COMP 0x0200 | 287 | #define INTR_EN1__PIPE_CPYBCK_CMD_COMP 0x0200 |
288 | #define INTR_EN1__LOCKED_BLK 0x0400 | 288 | #define INTR_EN1__LOCKED_BLK 0x0400 |
289 | #define INTR_EN1__UNSUP_CMD 0x0800 | 289 | #define INTR_EN1__UNSUP_CMD 0x0800 |
290 | #define INTR_EN1__INT_ACT 0x1000 | 290 | #define INTR_EN1__INT_ACT 0x1000 |
291 | #define INTR_EN1__RST_COMP 0x2000 | 291 | #define INTR_EN1__RST_COMP 0x2000 |
@@ -298,7 +298,7 @@ | |||
298 | #define ERR_PAGE_ADDR1 0x490 | 298 | #define ERR_PAGE_ADDR1 0x490 |
299 | #define ERR_PAGE_ADDR1__VALUE 0xffff | 299 | #define ERR_PAGE_ADDR1__VALUE 0xffff |
300 | 300 | ||
301 | #define ERR_BLOCK_ADDR1 0x4a0 | 301 | #define ERR_BLOCK_ADDR1 0x4a0 |
302 | #define ERR_BLOCK_ADDR1__VALUE 0xffff | 302 | #define ERR_BLOCK_ADDR1__VALUE 0xffff |
303 | 303 | ||
304 | #define INTR_STATUS2 0x4b0 | 304 | #define INTR_STATUS2 0x4b0 |
@@ -325,12 +325,12 @@ | |||
325 | #define INTR_EN2__DMA_CMD_COMP 0x0004 | 325 | #define INTR_EN2__DMA_CMD_COMP 0x0004 |
326 | #define INTR_EN2__TIME_OUT 0x0008 | 326 | #define INTR_EN2__TIME_OUT 0x0008 |
327 | #define INTR_EN2__PROGRAM_FAIL 0x0010 | 327 | #define INTR_EN2__PROGRAM_FAIL 0x0010 |
328 | #define INTR_EN2__ERASE_FAIL 0x0020 | 328 | #define INTR_EN2__ERASE_FAIL 0x0020 |
329 | #define INTR_EN2__LOAD_COMP 0x0040 | 329 | #define INTR_EN2__LOAD_COMP 0x0040 |
330 | #define INTR_EN2__PROGRAM_COMP 0x0080 | 330 | #define INTR_EN2__PROGRAM_COMP 0x0080 |
331 | #define INTR_EN2__ERASE_COMP 0x0100 | 331 | #define INTR_EN2__ERASE_COMP 0x0100 |
332 | #define INTR_EN2__PIPE_CPYBCK_CMD_COMP 0x0200 | 332 | #define INTR_EN2__PIPE_CPYBCK_CMD_COMP 0x0200 |
333 | #define INTR_EN2__LOCKED_BLK 0x0400 | 333 | #define INTR_EN2__LOCKED_BLK 0x0400 |
334 | #define INTR_EN2__UNSUP_CMD 0x0800 | 334 | #define INTR_EN2__UNSUP_CMD 0x0800 |
335 | #define INTR_EN2__INT_ACT 0x1000 | 335 | #define INTR_EN2__INT_ACT 0x1000 |
336 | #define INTR_EN2__RST_COMP 0x2000 | 336 | #define INTR_EN2__RST_COMP 0x2000 |
@@ -343,7 +343,7 @@ | |||
343 | #define ERR_PAGE_ADDR2 0x4e0 | 343 | #define ERR_PAGE_ADDR2 0x4e0 |
344 | #define ERR_PAGE_ADDR2__VALUE 0xffff | 344 | #define ERR_PAGE_ADDR2__VALUE 0xffff |
345 | 345 | ||
346 | #define ERR_BLOCK_ADDR2 0x4f0 | 346 | #define ERR_BLOCK_ADDR2 0x4f0 |
347 | #define ERR_BLOCK_ADDR2__VALUE 0xffff | 347 | #define ERR_BLOCK_ADDR2__VALUE 0xffff |
348 | 348 | ||
349 | #define INTR_STATUS3 0x500 | 349 | #define INTR_STATUS3 0x500 |
@@ -370,12 +370,12 @@ | |||
370 | #define INTR_EN3__DMA_CMD_COMP 0x0004 | 370 | #define INTR_EN3__DMA_CMD_COMP 0x0004 |
371 | #define INTR_EN3__TIME_OUT 0x0008 | 371 | #define INTR_EN3__TIME_OUT 0x0008 |
372 | #define INTR_EN3__PROGRAM_FAIL 0x0010 | 372 | #define INTR_EN3__PROGRAM_FAIL 0x0010 |
373 | #define INTR_EN3__ERASE_FAIL 0x0020 | 373 | #define INTR_EN3__ERASE_FAIL 0x0020 |
374 | #define INTR_EN3__LOAD_COMP 0x0040 | 374 | #define INTR_EN3__LOAD_COMP 0x0040 |
375 | #define INTR_EN3__PROGRAM_COMP 0x0080 | 375 | #define INTR_EN3__PROGRAM_COMP 0x0080 |
376 | #define INTR_EN3__ERASE_COMP 0x0100 | 376 | #define INTR_EN3__ERASE_COMP 0x0100 |
377 | #define INTR_EN3__PIPE_CPYBCK_CMD_COMP 0x0200 | 377 | #define INTR_EN3__PIPE_CPYBCK_CMD_COMP 0x0200 |
378 | #define INTR_EN3__LOCKED_BLK 0x0400 | 378 | #define INTR_EN3__LOCKED_BLK 0x0400 |
379 | #define INTR_EN3__UNSUP_CMD 0x0800 | 379 | #define INTR_EN3__UNSUP_CMD 0x0800 |
380 | #define INTR_EN3__INT_ACT 0x1000 | 380 | #define INTR_EN3__INT_ACT 0x1000 |
381 | #define INTR_EN3__RST_COMP 0x2000 | 381 | #define INTR_EN3__RST_COMP 0x2000 |
@@ -388,7 +388,7 @@ | |||
388 | #define ERR_PAGE_ADDR3 0x530 | 388 | #define ERR_PAGE_ADDR3 0x530 |
389 | #define ERR_PAGE_ADDR3__VALUE 0xffff | 389 | #define ERR_PAGE_ADDR3__VALUE 0xffff |
390 | 390 | ||
391 | #define ERR_BLOCK_ADDR3 0x540 | 391 | #define ERR_BLOCK_ADDR3 0x540 |
392 | #define ERR_BLOCK_ADDR3__VALUE 0xffff | 392 | #define ERR_BLOCK_ADDR3__VALUE 0xffff |
393 | 393 | ||
394 | #define DATA_INTR 0x550 | 394 | #define DATA_INTR 0x550 |
@@ -412,9 +412,9 @@ | |||
412 | #define GPREG_3__VALUE 0xffff | 412 | #define GPREG_3__VALUE 0xffff |
413 | 413 | ||
414 | #define ECC_THRESHOLD 0x600 | 414 | #define ECC_THRESHOLD 0x600 |
415 | #define ECC_THRESHOLD__VALUE 0x03ff | 415 | #define ECC_THRESHOLD__VALUE 0x03ff |
416 | 416 | ||
417 | #define ECC_ERROR_BLOCK_ADDRESS 0x610 | 417 | #define ECC_ERROR_BLOCK_ADDRESS 0x610 |
418 | #define ECC_ERROR_BLOCK_ADDRESS__VALUE 0xffff | 418 | #define ECC_ERROR_BLOCK_ADDRESS__VALUE 0xffff |
419 | 419 | ||
420 | #define ECC_ERROR_PAGE_ADDRESS 0x620 | 420 | #define ECC_ERROR_PAGE_ADDRESS 0x620 |
@@ -466,7 +466,7 @@ | |||
466 | #define CHNL_ACTIVE__CHANNEL3 0x0008 | 466 | #define CHNL_ACTIVE__CHANNEL3 0x0008 |
467 | 467 | ||
468 | #define ACTIVE_SRC_ID 0x800 | 468 | #define ACTIVE_SRC_ID 0x800 |
469 | #define ACTIVE_SRC_ID__VALUE 0x00ff | 469 | #define ACTIVE_SRC_ID__VALUE 0x00ff |
470 | 470 | ||
471 | #define PTN_INTR 0x810 | 471 | #define PTN_INTR 0x810 |
472 | #define PTN_INTR__CONFIG_ERROR 0x0001 | 472 | #define PTN_INTR__CONFIG_ERROR 0x0001 |
@@ -485,7 +485,7 @@ | |||
485 | #define PTN_INTR_EN__REG_ACCESS_ERROR 0x0020 | 485 | #define PTN_INTR_EN__REG_ACCESS_ERROR 0x0020 |
486 | 486 | ||
487 | #define PERM_SRC_ID_0 0x830 | 487 | #define PERM_SRC_ID_0 0x830 |
488 | #define PERM_SRC_ID_0__SRCID 0x00ff | 488 | #define PERM_SRC_ID_0__SRCID 0x00ff |
489 | #define PERM_SRC_ID_0__DIRECT_ACCESS_ACTIVE 0x0800 | 489 | #define PERM_SRC_ID_0__DIRECT_ACCESS_ACTIVE 0x0800 |
490 | #define PERM_SRC_ID_0__WRITE_ACTIVE 0x2000 | 490 | #define PERM_SRC_ID_0__WRITE_ACTIVE 0x2000 |
491 | #define PERM_SRC_ID_0__READ_ACTIVE 0x4000 | 491 | #define PERM_SRC_ID_0__READ_ACTIVE 0x4000 |
@@ -502,7 +502,7 @@ | |||
502 | #define MIN_MAX_BANK_0__MAX_VALUE 0x000c | 502 | #define MIN_MAX_BANK_0__MAX_VALUE 0x000c |
503 | 503 | ||
504 | #define PERM_SRC_ID_1 0x870 | 504 | #define PERM_SRC_ID_1 0x870 |
505 | #define PERM_SRC_ID_1__SRCID 0x00ff | 505 | #define PERM_SRC_ID_1__SRCID 0x00ff |
506 | #define PERM_SRC_ID_1__DIRECT_ACCESS_ACTIVE 0x0800 | 506 | #define PERM_SRC_ID_1__DIRECT_ACCESS_ACTIVE 0x0800 |
507 | #define PERM_SRC_ID_1__WRITE_ACTIVE 0x2000 | 507 | #define PERM_SRC_ID_1__WRITE_ACTIVE 0x2000 |
508 | #define PERM_SRC_ID_1__READ_ACTIVE 0x4000 | 508 | #define PERM_SRC_ID_1__READ_ACTIVE 0x4000 |
@@ -519,7 +519,7 @@ | |||
519 | #define MIN_MAX_BANK_1__MAX_VALUE 0x000c | 519 | #define MIN_MAX_BANK_1__MAX_VALUE 0x000c |
520 | 520 | ||
521 | #define PERM_SRC_ID_2 0x8b0 | 521 | #define PERM_SRC_ID_2 0x8b0 |
522 | #define PERM_SRC_ID_2__SRCID 0x00ff | 522 | #define PERM_SRC_ID_2__SRCID 0x00ff |
523 | #define PERM_SRC_ID_2__DIRECT_ACCESS_ACTIVE 0x0800 | 523 | #define PERM_SRC_ID_2__DIRECT_ACCESS_ACTIVE 0x0800 |
524 | #define PERM_SRC_ID_2__WRITE_ACTIVE 0x2000 | 524 | #define PERM_SRC_ID_2__WRITE_ACTIVE 0x2000 |
525 | #define PERM_SRC_ID_2__READ_ACTIVE 0x4000 | 525 | #define PERM_SRC_ID_2__READ_ACTIVE 0x4000 |
@@ -536,7 +536,7 @@ | |||
536 | #define MIN_MAX_BANK_2__MAX_VALUE 0x000c | 536 | #define MIN_MAX_BANK_2__MAX_VALUE 0x000c |
537 | 537 | ||
538 | #define PERM_SRC_ID_3 0x8f0 | 538 | #define PERM_SRC_ID_3 0x8f0 |
539 | #define PERM_SRC_ID_3__SRCID 0x00ff | 539 | #define PERM_SRC_ID_3__SRCID 0x00ff |
540 | #define PERM_SRC_ID_3__DIRECT_ACCESS_ACTIVE 0x0800 | 540 | #define PERM_SRC_ID_3__DIRECT_ACCESS_ACTIVE 0x0800 |
541 | #define PERM_SRC_ID_3__WRITE_ACTIVE 0x2000 | 541 | #define PERM_SRC_ID_3__WRITE_ACTIVE 0x2000 |
542 | #define PERM_SRC_ID_3__READ_ACTIVE 0x4000 | 542 | #define PERM_SRC_ID_3__READ_ACTIVE 0x4000 |
@@ -553,7 +553,7 @@ | |||
553 | #define MIN_MAX_BANK_3__MAX_VALUE 0x000c | 553 | #define MIN_MAX_BANK_3__MAX_VALUE 0x000c |
554 | 554 | ||
555 | #define PERM_SRC_ID_4 0x930 | 555 | #define PERM_SRC_ID_4 0x930 |
556 | #define PERM_SRC_ID_4__SRCID 0x00ff | 556 | #define PERM_SRC_ID_4__SRCID 0x00ff |
557 | #define PERM_SRC_ID_4__DIRECT_ACCESS_ACTIVE 0x0800 | 557 | #define PERM_SRC_ID_4__DIRECT_ACCESS_ACTIVE 0x0800 |
558 | #define PERM_SRC_ID_4__WRITE_ACTIVE 0x2000 | 558 | #define PERM_SRC_ID_4__WRITE_ACTIVE 0x2000 |
559 | #define PERM_SRC_ID_4__READ_ACTIVE 0x4000 | 559 | #define PERM_SRC_ID_4__READ_ACTIVE 0x4000 |
@@ -570,7 +570,7 @@ | |||
570 | #define MIN_MAX_BANK_4__MAX_VALUE 0x000c | 570 | #define MIN_MAX_BANK_4__MAX_VALUE 0x000c |
571 | 571 | ||
572 | #define PERM_SRC_ID_5 0x970 | 572 | #define PERM_SRC_ID_5 0x970 |
573 | #define PERM_SRC_ID_5__SRCID 0x00ff | 573 | #define PERM_SRC_ID_5__SRCID 0x00ff |
574 | #define PERM_SRC_ID_5__DIRECT_ACCESS_ACTIVE 0x0800 | 574 | #define PERM_SRC_ID_5__DIRECT_ACCESS_ACTIVE 0x0800 |
575 | #define PERM_SRC_ID_5__WRITE_ACTIVE 0x2000 | 575 | #define PERM_SRC_ID_5__WRITE_ACTIVE 0x2000 |
576 | #define PERM_SRC_ID_5__READ_ACTIVE 0x4000 | 576 | #define PERM_SRC_ID_5__READ_ACTIVE 0x4000 |
@@ -587,7 +587,7 @@ | |||
587 | #define MIN_MAX_BANK_5__MAX_VALUE 0x000c | 587 | #define MIN_MAX_BANK_5__MAX_VALUE 0x000c |
588 | 588 | ||
589 | #define PERM_SRC_ID_6 0x9b0 | 589 | #define PERM_SRC_ID_6 0x9b0 |
590 | #define PERM_SRC_ID_6__SRCID 0x00ff | 590 | #define PERM_SRC_ID_6__SRCID 0x00ff |
591 | #define PERM_SRC_ID_6__DIRECT_ACCESS_ACTIVE 0x0800 | 591 | #define PERM_SRC_ID_6__DIRECT_ACCESS_ACTIVE 0x0800 |
592 | #define PERM_SRC_ID_6__WRITE_ACTIVE 0x2000 | 592 | #define PERM_SRC_ID_6__WRITE_ACTIVE 0x2000 |
593 | #define PERM_SRC_ID_6__READ_ACTIVE 0x4000 | 593 | #define PERM_SRC_ID_6__READ_ACTIVE 0x4000 |
@@ -604,7 +604,7 @@ | |||
604 | #define MIN_MAX_BANK_6__MAX_VALUE 0x000c | 604 | #define MIN_MAX_BANK_6__MAX_VALUE 0x000c |
605 | 605 | ||
606 | #define PERM_SRC_ID_7 0x9f0 | 606 | #define PERM_SRC_ID_7 0x9f0 |
607 | #define PERM_SRC_ID_7__SRCID 0x00ff | 607 | #define PERM_SRC_ID_7__SRCID 0x00ff |
608 | #define PERM_SRC_ID_7__DIRECT_ACCESS_ACTIVE 0x0800 | 608 | #define PERM_SRC_ID_7__DIRECT_ACCESS_ACTIVE 0x0800 |
609 | #define PERM_SRC_ID_7__WRITE_ACTIVE 0x2000 | 609 | #define PERM_SRC_ID_7__WRITE_ACTIVE 0x2000 |
610 | #define PERM_SRC_ID_7__READ_ACTIVE 0x4000 | 610 | #define PERM_SRC_ID_7__READ_ACTIVE 0x4000 |
@@ -622,43 +622,40 @@ | |||
622 | 622 | ||
623 | /* flash.h */ | 623 | /* flash.h */ |
624 | struct device_info_tag { | 624 | struct device_info_tag { |
625 | uint16_t wDeviceMaker; | 625 | uint16_t wDeviceMaker; |
626 | uint16_t wDeviceID; | 626 | uint16_t wDeviceID; |
627 | uint8_t bDeviceParam0; | 627 | uint8_t bDeviceParam0; |
628 | uint8_t bDeviceParam1; | 628 | uint8_t bDeviceParam1; |
629 | uint8_t bDeviceParam2; | 629 | uint8_t bDeviceParam2; |
630 | uint32_t wDeviceType; | 630 | uint32_t wDeviceType; |
631 | uint32_t wSpectraStartBlock; | 631 | uint32_t wSpectraStartBlock; |
632 | uint32_t wSpectraEndBlock; | 632 | uint32_t wSpectraEndBlock; |
633 | uint32_t wTotalBlocks; | 633 | uint32_t wTotalBlocks; |
634 | uint16_t wPagesPerBlock; | 634 | uint16_t wPagesPerBlock; |
635 | uint16_t wPageSize; | 635 | uint16_t wPageSize; |
636 | uint16_t wPageDataSize; | 636 | uint16_t wPageDataSize; |
637 | uint16_t wPageSpareSize; | 637 | uint16_t wPageSpareSize; |
638 | uint16_t wNumPageSpareFlag; | 638 | uint16_t wNumPageSpareFlag; |
639 | uint16_t wECCBytesPerSector; | 639 | uint16_t wECCBytesPerSector; |
640 | uint32_t wBlockSize; | 640 | uint32_t wBlockSize; |
641 | uint32_t wBlockDataSize; | 641 | uint32_t wBlockDataSize; |
642 | uint32_t wDataBlockNum; | 642 | uint32_t wDataBlockNum; |
643 | uint8_t bPlaneNum; | 643 | uint8_t bPlaneNum; |
644 | uint16_t wDeviceMainAreaSize; | 644 | uint16_t wDeviceMainAreaSize; |
645 | uint16_t wDeviceSpareAreaSize; | 645 | uint16_t wDeviceSpareAreaSize; |
646 | uint16_t wDevicesConnected; | 646 | uint16_t wDevicesConnected; |
647 | uint16_t wDeviceWidth; | 647 | uint16_t wDeviceWidth; |
648 | uint16_t wHWRevision; | 648 | uint16_t wHWRevision; |
649 | uint16_t wHWFeatures; | 649 | uint16_t wHWFeatures; |
650 | 650 | uint16_t wONFIDevFeatures; | |
651 | uint16_t wONFIDevFeatures; | 651 | uint16_t wONFIOptCommands; |
652 | uint16_t wONFIOptCommands; | 652 | uint16_t wONFITimingMode; |
653 | uint16_t wONFITimingMode; | 653 | uint16_t wONFIPgmCacheTimingMode; |
654 | uint16_t wONFIPgmCacheTimingMode; | 654 | uint16_t MLCDevice; |
655 | 655 | uint16_t wSpareSkipBytes; | |
656 | uint16_t MLCDevice; | 656 | uint8_t nBitsInPageNumber; |
657 | uint16_t wSpareSkipBytes; | 657 | uint8_t nBitsInPageDataSize; |
658 | 658 | uint8_t nBitsInBlockDataSize; | |
659 | uint8_t nBitsInPageNumber; | ||
660 | uint8_t nBitsInPageDataSize; | ||
661 | uint8_t nBitsInBlockDataSize; | ||
662 | }; | 659 | }; |
663 | 660 | ||
664 | /* ffsdefs.h */ | 661 | /* ffsdefs.h */ |
@@ -684,11 +681,11 @@ struct device_info_tag { | |||
684 | #define NAND_DBG_TRACE 3 | 681 | #define NAND_DBG_TRACE 3 |
685 | 682 | ||
686 | #ifdef VERBOSE | 683 | #ifdef VERBOSE |
687 | #define nand_dbg_print(level, args...) \ | 684 | #define nand_dbg_print(level, args...) \ |
688 | do { \ | 685 | do { \ |
689 | if (level <= nand_debug_level) \ | 686 | if (level <= nand_debug_level) \ |
690 | printk(KERN_ALERT args); \ | 687 | printk(KERN_ALERT args); \ |
691 | } while (0) | 688 | } while (0) |
692 | #else | 689 | #else |
693 | #define nand_dbg_print(level, args...) | 690 | #define nand_dbg_print(level, args...) |
694 | #endif | 691 | #endif |
@@ -772,10 +769,9 @@ struct device_info_tag { | |||
772 | #define ECC_SECTOR_SIZE 512 | 769 | #define ECC_SECTOR_SIZE 512 |
773 | #define LLD_MAX_FLASH_BANKS 4 | 770 | #define LLD_MAX_FLASH_BANKS 4 |
774 | 771 | ||
775 | #define DENALI_BUF_SIZE NAND_MAX_PAGESIZE + NAND_MAX_OOBSIZE | 772 | #define DENALI_BUF_SIZE (NAND_MAX_PAGESIZE + NAND_MAX_OOBSIZE) |
776 | 773 | ||
777 | struct nand_buf | 774 | struct nand_buf { |
778 | { | ||
779 | int head; | 775 | int head; |
780 | int tail; | 776 | int tail; |
781 | uint8_t buf[DENALI_BUF_SIZE]; | 777 | uint8_t buf[DENALI_BUF_SIZE]; |
@@ -808,9 +804,9 @@ struct denali_nand_info { | |||
808 | int idx; | 804 | int idx; |
809 | }; | 805 | }; |
810 | 806 | ||
811 | static uint16_t NAND_Flash_Reset(struct denali_nand_info *denali); | 807 | static uint16_t NAND_Flash_Reset(struct denali_nand_info *denali); |
812 | static uint16_t NAND_Read_Device_ID(struct denali_nand_info *denali); | 808 | static uint16_t NAND_Read_Device_ID(struct denali_nand_info *denali); |
813 | static void NAND_LLD_Enable_Disable_Interrupts(struct denali_nand_info *denali, uint16_t INT_ENABLE); | 809 | static void NAND_LLD_Enable_Disable_Interrupts(struct denali_nand_info *denali, |
810 | uint16_t INT_ENABLE); | ||
814 | 811 | ||
815 | #endif /*_LLD_NAND_*/ | 812 | #endif /*_LLD_NAND_*/ |
816 | |||