diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-03-22 16:07:02 -0400 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2017-03-24 04:51:28 -0400 |
commit | 357cc408a4009c0d118b684e4865f85694ebc68c (patch) | |
tree | 33c619e388ec8506f99ab5a2274aea6286f34b63 | |
parent | c120e75e0e7deff88119376298342df139b9b17c (diff) |
mtd: nand: denali: remove unused CONFIG option and macros
All of these macros are not used at all.
CONFIG_MTD_NAND_DENALI_SCRATCH_REG_ADDR is not used for anything but
defining SCRATCH_REG_ADDR. The config option should go away as well.
I am removing some register macros. They are not used, and do not
exist in recent IP versions.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
-rw-r--r-- | drivers/mtd/nand/Kconfig | 11 | ||||
-rw-r--r-- | drivers/mtd/nand/denali.c | 5 | ||||
-rw-r--r-- | drivers/mtd/nand/denali.h | 99 |
3 files changed, 0 insertions, 115 deletions
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index ae7ae77f295e..aa44fb0a1b18 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig | |||
@@ -59,17 +59,6 @@ config MTD_NAND_DENALI_DT | |||
59 | Enable the driver for NAND flash on platforms using a Denali NAND | 59 | Enable the driver for NAND flash on platforms using a Denali NAND |
60 | controller as a DT device. | 60 | controller as a DT device. |
61 | 61 | ||
62 | config MTD_NAND_DENALI_SCRATCH_REG_ADDR | ||
63 | hex "Denali NAND size scratch register address" | ||
64 | default "0xFF108018" | ||
65 | depends on MTD_NAND_DENALI_PCI | ||
66 | help | ||
67 | Some platforms place the NAND chip size in a scratch register | ||
68 | because (some versions of) the driver aren't able to automatically | ||
69 | determine the size of certain chips. Set the address of the | ||
70 | scratch register here to enable this feature. On Intel Moorestown | ||
71 | boards, the scratch register is at 0xFF108018. | ||
72 | |||
73 | config MTD_NAND_GPIO | 62 | config MTD_NAND_GPIO |
74 | tristate "GPIO assisted NAND Flash driver" | 63 | tristate "GPIO assisted NAND Flash driver" |
75 | depends on GPIOLIB || COMPILE_TEST | 64 | depends on GPIOLIB || COMPILE_TEST |
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 73b9d4e2dca0..f993e1378f94 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c | |||
@@ -91,11 +91,6 @@ static inline struct denali_nand_info *mtd_to_denali(struct mtd_info *mtd) | |||
91 | #define DENALI_READ 0 | 91 | #define DENALI_READ 0 |
92 | #define DENALI_WRITE 0x100 | 92 | #define DENALI_WRITE 0x100 |
93 | 93 | ||
94 | /* types of device accesses. We can issue commands and get status */ | ||
95 | #define COMMAND_CYCLE 0 | ||
96 | #define ADDR_CYCLE 1 | ||
97 | #define STATUS_CYCLE 2 | ||
98 | |||
99 | /* | 94 | /* |
100 | * this is a helper macro that allows us to | 95 | * this is a helper macro that allows us to |
101 | * format the bank into the proper bits for the controller | 96 | * format the bank into the proper bits for the controller |
diff --git a/drivers/mtd/nand/denali.h b/drivers/mtd/nand/denali.h index ea22191e8515..c4f3a683de93 100644 --- a/drivers/mtd/nand/denali.h +++ b/drivers/mtd/nand/denali.h | |||
@@ -257,26 +257,6 @@ | |||
257 | #define ERR_PAGE_ADDR(__bank) (0x440 + ((__bank) * 0x50)) | 257 | #define ERR_PAGE_ADDR(__bank) (0x440 + ((__bank) * 0x50)) |
258 | #define ERR_BLOCK_ADDR(__bank) (0x450 + ((__bank) * 0x50)) | 258 | #define ERR_BLOCK_ADDR(__bank) (0x450 + ((__bank) * 0x50)) |
259 | 259 | ||
260 | #define DATA_INTR 0x550 | ||
261 | #define DATA_INTR__WRITE_SPACE_AV 0x0001 | ||
262 | #define DATA_INTR__READ_DATA_AV 0x0002 | ||
263 | |||
264 | #define DATA_INTR_EN 0x560 | ||
265 | #define DATA_INTR_EN__WRITE_SPACE_AV 0x0001 | ||
266 | #define DATA_INTR_EN__READ_DATA_AV 0x0002 | ||
267 | |||
268 | #define GPREG_0 0x570 | ||
269 | #define GPREG_0__VALUE 0xffff | ||
270 | |||
271 | #define GPREG_1 0x580 | ||
272 | #define GPREG_1__VALUE 0xffff | ||
273 | |||
274 | #define GPREG_2 0x590 | ||
275 | #define GPREG_2__VALUE 0xffff | ||
276 | |||
277 | #define GPREG_3 0x5a0 | ||
278 | #define GPREG_3__VALUE 0xffff | ||
279 | |||
280 | #define ECC_THRESHOLD 0x600 | 260 | #define ECC_THRESHOLD 0x600 |
281 | #define ECC_THRESHOLD__VALUE 0x03ff | 261 | #define ECC_THRESHOLD__VALUE 0x03ff |
282 | 262 | ||
@@ -331,69 +311,15 @@ | |||
331 | #define CHNL_ACTIVE__CHANNEL2 0x0004 | 311 | #define CHNL_ACTIVE__CHANNEL2 0x0004 |
332 | #define CHNL_ACTIVE__CHANNEL3 0x0008 | 312 | #define CHNL_ACTIVE__CHANNEL3 0x0008 |
333 | 313 | ||
334 | #define ACTIVE_SRC_ID 0x800 | ||
335 | #define ACTIVE_SRC_ID__VALUE 0x00ff | ||
336 | |||
337 | #define PTN_INTR 0x810 | ||
338 | #define PTN_INTR__CONFIG_ERROR 0x0001 | ||
339 | #define PTN_INTR__ACCESS_ERROR_BANK0 0x0002 | ||
340 | #define PTN_INTR__ACCESS_ERROR_BANK1 0x0004 | ||
341 | #define PTN_INTR__ACCESS_ERROR_BANK2 0x0008 | ||
342 | #define PTN_INTR__ACCESS_ERROR_BANK3 0x0010 | ||
343 | #define PTN_INTR__REG_ACCESS_ERROR 0x0020 | ||
344 | |||
345 | #define PTN_INTR_EN 0x820 | ||
346 | #define PTN_INTR_EN__CONFIG_ERROR 0x0001 | ||
347 | #define PTN_INTR_EN__ACCESS_ERROR_BANK0 0x0002 | ||
348 | #define PTN_INTR_EN__ACCESS_ERROR_BANK1 0x0004 | ||
349 | #define PTN_INTR_EN__ACCESS_ERROR_BANK2 0x0008 | ||
350 | #define PTN_INTR_EN__ACCESS_ERROR_BANK3 0x0010 | ||
351 | #define PTN_INTR_EN__REG_ACCESS_ERROR 0x0020 | ||
352 | |||
353 | #define PERM_SRC_ID(__bank) (0x830 + ((__bank) * 0x40)) | ||
354 | #define PERM_SRC_ID__SRCID 0x00ff | ||
355 | #define PERM_SRC_ID__DIRECT_ACCESS_ACTIVE 0x0800 | ||
356 | #define PERM_SRC_ID__WRITE_ACTIVE 0x2000 | ||
357 | #define PERM_SRC_ID__READ_ACTIVE 0x4000 | ||
358 | #define PERM_SRC_ID__PARTITION_VALID 0x8000 | ||
359 | |||
360 | #define MIN_BLK_ADDR(__bank) (0x840 + ((__bank) * 0x40)) | ||
361 | #define MIN_BLK_ADDR__VALUE 0xffff | ||
362 | |||
363 | #define MAX_BLK_ADDR(__bank) (0x850 + ((__bank) * 0x40)) | ||
364 | #define MAX_BLK_ADDR__VALUE 0xffff | ||
365 | |||
366 | #define MIN_MAX_BANK(__bank) (0x860 + ((__bank) * 0x40)) | ||
367 | #define MIN_MAX_BANK__MIN_VALUE 0x0003 | ||
368 | #define MIN_MAX_BANK__MAX_VALUE 0x000c | ||
369 | |||
370 | |||
371 | /* ffsdefs.h */ | ||
372 | #define CLEAR 0 /*use this to clear a field instead of "fail"*/ | ||
373 | #define SET 1 /*use this to set a field instead of "pass"*/ | ||
374 | #define FAIL 1 /*failed flag*/ | 314 | #define FAIL 1 /*failed flag*/ |
375 | #define PASS 0 /*success flag*/ | 315 | #define PASS 0 /*success flag*/ |
376 | #define ERR -1 /*error flag*/ | ||
377 | |||
378 | /* lld.h */ | ||
379 | #define GOOD_BLOCK 0 | ||
380 | #define DEFECTIVE_BLOCK 1 | ||
381 | #define READ_ERROR 2 | ||
382 | 316 | ||
383 | #define CLK_X 5 | 317 | #define CLK_X 5 |
384 | #define CLK_MULTI 4 | 318 | #define CLK_MULTI 4 |
385 | 319 | ||
386 | /* KBV - Updated to LNW scratch register address */ | ||
387 | #define SCRATCH_REG_ADDR CONFIG_MTD_NAND_DENALI_SCRATCH_REG_ADDR | ||
388 | #define SCRATCH_REG_SIZE 64 | ||
389 | |||
390 | #define GLOB_HWCTL_DEFAULT_BLKS 2048 | ||
391 | |||
392 | #define SUPPORT_15BITECC 1 | 320 | #define SUPPORT_15BITECC 1 |
393 | #define SUPPORT_8BITECC 1 | 321 | #define SUPPORT_8BITECC 1 |
394 | 322 | ||
395 | #define CUSTOM_CONF_PARAMS 0 | ||
396 | |||
397 | #define ONFI_BLOOM_TIME 1 | 323 | #define ONFI_BLOOM_TIME 1 |
398 | #define MODE5_WORKAROUND 0 | 324 | #define MODE5_WORKAROUND 0 |
399 | 325 | ||
@@ -403,31 +329,6 @@ | |||
403 | #define MODE_10 0x08000000 | 329 | #define MODE_10 0x08000000 |
404 | #define MODE_11 0x0C000000 | 330 | #define MODE_11 0x0C000000 |
405 | 331 | ||
406 | |||
407 | #define DATA_TRANSFER_MODE 0 | ||
408 | #define PROTECTION_PER_BLOCK 1 | ||
409 | #define LOAD_WAIT_COUNT 2 | ||
410 | #define PROGRAM_WAIT_COUNT 3 | ||
411 | #define ERASE_WAIT_COUNT 4 | ||
412 | #define INT_MONITOR_CYCLE_COUNT 5 | ||
413 | #define READ_BUSY_PIN_ENABLED 6 | ||
414 | #define MULTIPLANE_OPERATION_SUPPORT 7 | ||
415 | #define PRE_FETCH_MODE 8 | ||
416 | #define CE_DONT_CARE_SUPPORT 9 | ||
417 | #define COPYBACK_SUPPORT 10 | ||
418 | #define CACHE_WRITE_SUPPORT 11 | ||
419 | #define CACHE_READ_SUPPORT 12 | ||
420 | #define NUM_PAGES_IN_BLOCK 13 | ||
421 | #define ECC_ENABLE_SELECT 14 | ||
422 | #define WRITE_ENABLE_2_READ_ENABLE 15 | ||
423 | #define ADDRESS_2_DATA 16 | ||
424 | #define READ_ENABLE_2_WRITE_ENABLE 17 | ||
425 | #define TWO_ROW_ADDRESS_CYCLES 18 | ||
426 | #define MULTIPLANE_ADDRESS_RESTRICT 19 | ||
427 | #define ACC_CLOCKS 20 | ||
428 | #define READ_WRITE_ENABLE_LOW_COUNT 21 | ||
429 | #define READ_WRITE_ENABLE_HIGH_COUNT 22 | ||
430 | |||
431 | #define ECC_SECTOR_SIZE 512 | 332 | #define ECC_SECTOR_SIZE 512 |
432 | 333 | ||
433 | struct nand_buf { | 334 | struct nand_buf { |