* [PATCH] Bugfix subpage read for small page NAND.
@ 2008-07-29 12:54 Alexey Korolev
2008-07-30 9:00 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Korolev @ 2008-07-29 12:54 UTC (permalink / raw)
To: dwmw2, dedekind; +Cc: linux-mtd
Hi,
Current implementation of subpage read feature for NAND has issues with
small page devices. Small page NAND do not support RNDOUT command.
So subpage feature is not applicable for them.
This patch disables support of subpage for small page NAND.
The code is verified on nandsim(SP NAND simulation) and on LP NAND
devices.
Thanks a lot to Artem for finding this issue.
Signed-off-by: Alexey Korolev <akorolev@infradead.org>
-----------
diff -Naurp 1/include/linux/mtd/nand.h 2/include/linux/mtd/nand.h
--- 1/include/linux/mtd/nand.h 2008-07-29 16:05:17.000000000 +0400
+++ 2/include/linux/mtd/nand.h 2008-07-29 15:38:34.000000000 +0400
@@ -177,7 +177,9 @@ typedef enum {
#define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING))
#define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG))
#define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK))
-#define NAND_SUBPAGE_READ(chip) ((chip->ecc.mode == NAND_ECC_SOFT))
+/* Large page NAND with SOFT_ECC should support subpage reads */
+#define NAND_SUBPAGE_READ(chip) ((chip->ecc.mode == NAND_ECC_SOFT) \
+ && (chip->page_shift > 9))
/* Mask to zero out the chip options, which come from the id table */
#define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR)
-----------
Thanks,
Alexey
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] Bugfix subpage read for small page NAND.
2008-07-29 12:54 [PATCH] Bugfix subpage read for small page NAND Alexey Korolev
@ 2008-07-30 9:00 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2008-07-30 9:00 UTC (permalink / raw)
To: Alexey Korolev; +Cc: linux-mtd, dwmw2
On Tue, 2008-07-29 at 13:54 +0100, Alexey Korolev wrote:
> Current implementation of subpage read feature for NAND has issues with
> small page devices. Small page NAND do not support RNDOUT command.
> So subpage feature is not applicable for them.
>
> This patch disables support of subpage for small page NAND.
> The code is verified on nandsim(SP NAND simulation) and on LP NAND
> devices.
I've put this and my nandsim fix to
git://git.infradead.org/~dedekind/mtd-fixes.git master
With those 2 patches nandsim is happy for both LP and SP NANDs.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-30 9:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-29 12:54 [PATCH] Bugfix subpage read for small page NAND Alexey Korolev
2008-07-30 9:00 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox