Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1386200 > unrolled thread
| Started by | Boris Brezillon <boris.brezillon@free-electrons.com> |
|---|---|
| First post | 2016-04-25 12:10 +0200 |
| Last post | 2016-04-28 10:10 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 0/4] mtd: add support for pairing scheme description Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-04-25 12:10 +0200
[PATCH 3/4] mtd: nand: add a pairing field to nand_flash_dev Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-04-25 12:10 +0200
Re: [PATCH 0/4] mtd: add support for pairing scheme description Richard Weinberger <richard@nod.at> - 2016-04-28 10:10 +0200
| From | Boris Brezillon <boris.brezillon@free-electrons.com> |
|---|---|
| Date | 2016-04-25 12:10 +0200 |
| Subject | [PATCH 0/4] mtd: add support for pairing scheme description |
| Message-ID | <rrLCO-3W5-3@gated-at.bofh.it> |
Hi,
This series is the first step towards reliable MLC/TLC NAND support.
Those patches allows the NAND layer to expose page pairing information
to MTD users.
The plan is to teach UBI about those constraints and let UBI code take
the appropriate precautions when dealing with those multi-level cells
NANDs. The way we'll handle this "paired pages" constraint will be
described soon in a series adapting the UBI layer, so stay tune ;).
Note that this implementation only allows page pairing scheme description
when the NAND has a full-id entry in the nand_ids table.
This should be addressed in some way for ONFI and JEDEC NANDs, though
I'm not sure how to handle this yet.
Best Regards,
Boris
Boris Brezillon (4):
mtd: introduce the mtd_pairing_scheme concept
mtd: nand: implement two pairing scheme
mtd: nand: add a pairing field to nand_flash_dev
mtd: nand: H27UCG8T2ATR: point to the correct pairing scheme
implementation
drivers/mtd/mtdcore.c | 62 ++++++++++++++++++++++++++++
drivers/mtd/mtdpart.c | 1 +
drivers/mtd/nand/nand_base.c | 97 ++++++++++++++++++++++++++++++++++++++++++++
drivers/mtd/nand/nand_ids.c | 2 +-
include/linux/mtd/mtd.h | 64 +++++++++++++++++++++++++++++
include/linux/mtd/nand.h | 5 +++
6 files changed, 230 insertions(+), 1 deletion(-)
--
2.7.4
[toc] | [next] | [standalone]
| From | Boris Brezillon <boris.brezillon@free-electrons.com> |
|---|---|
| Date | 2016-04-25 12:10 +0200 |
| Subject | [PATCH 3/4] mtd: nand: add a pairing field to nand_flash_dev |
| Message-ID | <rrLCP-3W5-31@gated-at.bofh.it> |
| In reply to | #1386200 |
Add a new field to attach a pairing scheme to a NAND chip definition, and
assign it to mtd->pairing when a full-id match is detected.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
drivers/mtd/nand/nand_base.c | 1 +
include/linux/mtd/nand.h | 2 ++
2 files changed, 3 insertions(+)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index a64e0d5..0666b59 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3791,6 +3791,7 @@ static bool find_full_id_nand(struct mtd_info *mtd, struct nand_chip *chip,
mtd->writesize = type->pagesize;
mtd->erasesize = type->erasesize;
mtd->oobsize = type->oobsize;
+ mtd->pairing = type->pairing;
chip->bits_per_cell = nand_get_bits_per_cell(id_data[2]);
chip->chipsize = (uint64_t)type->chipsize << 20;
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 874b267..685b26e 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -855,6 +855,7 @@ static inline void nand_set_controller_data(struct nand_chip *chip, void *priv)
* @onfi_timing_mode_default: the default ONFI timing mode entered after a NAND
* reset. Should be deduced from timings described
* in the datasheet.
+ * @pairing: The page pairing scheme used by this NAND, if any.
*
*/
struct nand_flash_dev {
@@ -877,6 +878,7 @@ struct nand_flash_dev {
uint16_t step_ds;
} ecc;
int onfi_timing_mode_default;
+ const struct mtd_pairing_scheme *pairing;
};
/**
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Richard Weinberger <richard@nod.at> |
|---|---|
| Date | 2016-04-28 10:10 +0200 |
| Message-ID | <rsPbk-8iP-11@gated-at.bofh.it> |
| In reply to | #1386200 |
Am 25.04.2016 um 12:01 schrieb Boris Brezillon: > Hi, > > This series is the first step towards reliable MLC/TLC NAND support. > Those patches allows the NAND layer to expose page pairing information > to MTD users. > The plan is to teach UBI about those constraints and let UBI code take > the appropriate precautions when dealing with those multi-level cells > NANDs. The way we'll handle this "paired pages" constraint will be > described soon in a series adapting the UBI layer, so stay tune ;). > > Note that this implementation only allows page pairing scheme description > when the NAND has a full-id entry in the nand_ids table. > This should be addressed in some way for ONFI and JEDEC NANDs, though > I'm not sure how to handle this yet. > > Best Regards, > > Boris > > Boris Brezillon (4): > mtd: introduce the mtd_pairing_scheme concept > mtd: nand: implement two pairing scheme > mtd: nand: add a pairing field to nand_flash_dev > mtd: nand: H27UCG8T2ATR: point to the correct pairing scheme > implementation For the whole series: Reviewed-by: Richard Weinberger <richard@nod.at> Thanks, //richard
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web