[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1477686464-7437-6-git-send-email-zach.brown@ni.com>
Date: Fri, 28 Oct 2016 15:27:44 -0500
From: Zach Brown <zach.brown@...com>
To: <dwmw2@...radead.org>
CC: <computersforpeace@...il.com>,
<boris.brezillon@...e-electrons.com>, <richard@....at>,
<dedekind1@...il.com>, <linux-mtd@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH v3 5/5] mtd: nand: set bb_per_lun and blocks_per_lun for ONFI compliant chips
ONFI compliant chips contain the values for the bb_per_lun and
blocks_per_lun fields in the parameter page. When the ONFI paged is
retrieved/parsed the chip's fields are set by the corresponding fields
in the param page.
Signed-off-by: Zach Brown <zach.brown@...com>
---
drivers/mtd/nand/nand_base.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index ed8dc89..c4ced91 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3619,6 +3619,11 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
if (p->jedec_id == NAND_MFR_MICRON)
nand_onfi_detect_micron(chip, p);
+ if (p->bb_per_lun)
+ chip->bb_per_lun = p->bb_per_lun;
+ if (p->blocks_per_lun)
+ chip->blocks_per_lun = p->blocks_per_lun;
+
return 1;
}
--
2.7.4
Powered by blists - more mailing lists