aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/davinci_nand.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-30 11:31:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-30 11:31:35 -0400
commit79346507ad48895f41b438fa562b1965721f36b9 (patch)
tree5c115ce87f1fbc0b530f30db56cecf824e9f6e05 /drivers/mtd/nand/davinci_nand.c
parent706d4b12f8d7edd28d7e879a77235472da393edb (diff)
parent40847437f15221b5822ba70550e8b9fcccfb9bb3 (diff)
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (82 commits) mtd: fix build error in m25p80.c mtd: Remove redundant mutex from mtd_blkdevs.c MTD: Fix wrong check register_blkdev return value Revert "mtd: cleanup Kconfig dependencies" mtd: cfi_cmdset_0002: make sector erase command variable mtd: cfi_cmdset_0002: add CFI detection for SST 38VF640x chips mtd: cfi_util: add support for switching SST 39VF640xB chips into QRY mode mtd: cfi_cmdset_0001: use defined value of P_ID_INTEL_PERFORMANCE instead of hardcoded one block2mtd: dubious assignment P4080/mtd: Fix the freescale lbc issue with 36bit mode P4080/eLBC: Make Freescale elbc interrupt common to elbc devices mtd: phram: use KBUILD_MODNAME mtd: OneNAND: S5PC110: Fix double call suspend & resume function mtd: nand: fix MTD_MODE_RAW writes jffs2: use kmemdup mtd: sm_ftl: cosmetic, use bool when possible mtd: r852: remove useless pci powerup/down from suspend/resume routines mtd: blktrans: fix a race vs kthread_stop mtd: blktrans: kill BKL mtd: allow to unload the mtdtrans module if its block devices aren't open ... Fix up trivial whitespace-introduced conflict in drivers/mtd/mtdchar.c
Diffstat (limited to 'drivers/mtd/nand/davinci_nand.c')
-rw-r--r--drivers/mtd/nand/davinci_nand.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index 8beb0d0233b5..a90fde3ede28 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -316,7 +316,7 @@ static int nand_davinci_correct_4bit(struct mtd_info *mtd,
316 u32 syndrome[4]; 316 u32 syndrome[4];
317 u32 ecc_state; 317 u32 ecc_state;
318 unsigned num_errors, corrected; 318 unsigned num_errors, corrected;
319 unsigned long timeo = jiffies + msecs_to_jiffies(100); 319 unsigned long timeo;
320 320
321 /* All bytes 0xff? It's an erased page; ignore its ECC. */ 321 /* All bytes 0xff? It's an erased page; ignore its ECC. */
322 for (i = 0; i < 10; i++) { 322 for (i = 0; i < 10; i++) {
@@ -372,9 +372,11 @@ compare:
372 * after setting the 4BITECC_ADD_CALC_START bit. So if you immediately 372 * after setting the 4BITECC_ADD_CALC_START bit. So if you immediately
373 * begin trying to poll for the state, you may fall right out of your 373 * begin trying to poll for the state, you may fall right out of your
374 * loop without any of the correction calculations having taken place. 374 * loop without any of the correction calculations having taken place.
375 * The recommendation from the hardware team is to wait till ECC_STATE 375 * The recommendation from the hardware team is to initially delay as
376 * reads less than 4, which means ECC HW has entered correction state. 376 * long as ECC_STATE reads less than 4. After that, ECC HW has entered
377 * correction state.
377 */ 378 */
379 timeo = jiffies + usecs_to_jiffies(100);
378 do { 380 do {
379 ecc_state = (davinci_nand_readl(info, 381 ecc_state = (davinci_nand_readl(info,
380 NANDFSR_OFFSET) >> 8) & 0x0f; 382 NANDFSR_OFFSET) >> 8) & 0x0f;
@@ -733,6 +735,9 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
733 * breaks userspace ioctl interface with mtd-utils. Once we 735 * breaks userspace ioctl interface with mtd-utils. Once we
734 * resolve this issue, NAND_ECC_HW_OOB_FIRST mode can be used 736 * resolve this issue, NAND_ECC_HW_OOB_FIRST mode can be used
735 * for the 4KiB page chips. 737 * for the 4KiB page chips.
738 *
739 * TODO: Note that nand_ecclayout has now been expanded and can
740 * hold plenty of OOB entries.
736 */ 741 */
737 dev_warn(&pdev->dev, "no 4-bit ECC support yet " 742 dev_warn(&pdev->dev, "no 4-bit ECC support yet "
738 "for 4KiB-page NAND\n"); 743 "for 4KiB-page NAND\n");