lkml.org 
[lkml]   [2018]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] mtd: rawnand: docg4: specify bits_per_cell
Date
This fixes WARN() in nand_is_slc().

DoC G4 is 2-bit MLC, so set bits_per_cell value according to this.

Signed-off-by: Sergey Larin <cerg2010cerg2010@mail.ru>
---
drivers/mtd/nand/raw/docg4.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/raw/docg4.c b/drivers/mtd/nand/raw/docg4.c
index bbed8ea7858c..82d97a16e246 100644
--- a/drivers/mtd/nand/raw/docg4.c
+++ b/drivers/mtd/nand/raw/docg4.c
@@ -1250,6 +1250,7 @@ static void __init init_mtd_structs(struct mtd_info *mtd)
nand->pagemask = 0x3ffff;
nand->badblockpos = NAND_LARGE_BADBLOCK_POS;
nand->badblockbits = 8;
+ nand->bits_per_cell = 2;
nand->ecc.mode = NAND_ECC_HW_SYNDROME;
nand->ecc.size = DOCG4_PAGE_SIZE;
nand->ecc.prepad = 8;
--
2.18.0
\
 
 \ /
  Last update: 2018-07-08 13:31    [W:0.052 / U:8.280 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site