diff mbox

[1/3] mtd: nand: add NAND_NEED_SCRAMBLING option flag

Message ID 1444929443-25537-2-git-send-email-boris.brezillon@free-electrons.com
State Accepted
Commit c03d996900f9d063b47ef7462885a9085c8a587f
Headers show

Commit Message

Boris Brezillon Oct. 15, 2015, 5:17 p.m. UTC
Some MLC NANDs are sensible to repeated patterns and require data to be
scrambled in order to limit the number of bitflips.
Add a new flag to let the NAND controller know about this constraint.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
 include/linux/mtd/nand.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Julian Calaby Oct. 15, 2015, 10:32 p.m. UTC | #1
Hi Boris,

On Fri, Oct 16, 2015 at 4:17 AM, Boris Brezillon
<boris.brezillon@free-electrons.com> wrote:
> Some MLC NANDs are sensible to repeated patterns and require data to be

Do you mean "sensitive" instead of "sensible"?

Thanks,
Boris Brezillon Oct. 16, 2015, 6:28 a.m. UTC | #2
Hi Julian,

On Fri, 16 Oct 2015 09:32:38 +1100
Julian Calaby <julian.calaby@gmail.com> wrote:

> Hi Boris,
> 
> On Fri, Oct 16, 2015 at 4:17 AM, Boris Brezillon
> <boris.brezillon@free-electrons.com> wrote:
> > Some MLC NANDs are sensible to repeated patterns and require data to be
> 
> Do you mean "sensitive" instead of "sensible"?

Yes (I always mix the too, sensible is the french word for
sensitive ;-)), I'll fix that.

Best Regards,

Boris
Boris Brezillon Oct. 16, 2015, 6:38 a.m. UTC | #3
On Fri, 16 Oct 2015 08:28:54 +0200
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:

> Hi Julian,
> 
> On Fri, 16 Oct 2015 09:32:38 +1100
> Julian Calaby <julian.calaby@gmail.com> wrote:
> 
> > Hi Boris,
> > 
> > On Fri, Oct 16, 2015 at 4:17 AM, Boris Brezillon
> > <boris.brezillon@free-electrons.com> wrote:
> > > Some MLC NANDs are sensible to repeated patterns and require data to be
> > 
> > Do you mean "sensitive" instead of "sensible"?
> 
> Yes (I always mix the too, sensible is the french word for
                        two

> sensitive ;-)), I'll fix that.
> 
> Best Regards,
> 
> Boris
>
diff mbox

Patch

diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 5a9d1d4..19b4c6f 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -160,6 +160,12 @@  typedef enum {
 /* Device supports subpage reads */
 #define NAND_SUBPAGE_READ	0x00001000
 
+/*
+ * Some MLC NANDs need data scrambling to limit bitflips caused by repeated
+ * patterns.
+ */
+#define NAND_NEED_SCRAMBLING	0x00002000
+
 /* Options valid for Samsung large page devices */
 #define NAND_SAMSUNG_LP_OPTIONS NAND_CACHEPRG