* [PATCH 0/5] Creation of a SPI-NAND ECC engine
@ 2020-09-30 15:41 Miquel Raynal
2020-09-30 15:41 ` [PATCH 1/5] mtd: spinand: Fix typo in comment Miquel Raynal
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: Miquel Raynal @ 2020-09-30 15:41 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, linux-mtd
Cc: Julien Su, ycllin, Thomas Petazzoni
Hello,
As part of a broader work to bring generic ECC support to SPI-NAND
devices, a series was sent recently to create real software ECC
engines (independent from the NAND technology used). Not it is time to
do it for the widely spread on-die ECC engine: it must be represented
as a regular engine so that the user can choose. Next step will be to
bring hardware ECC engines support for SPI-NAND devices.
Thanks,
Miquèl
Miquel Raynal (5):
mtd: spinand: Fix typo in comment
mtd: spinand: Move ECC related definitions earlier in the driver
mtd: spinand: Instantiate a SPI-NAND on-die ECC engine
mtd: nand: Let on-die ECC engines be retrieved from the NAND core
mtd: spinand: Fill a default ECC provider/algorithm
drivers/mtd/nand/ecc.c | 6 +
drivers/mtd/nand/spi/core.c | 179 ++++++++++++++++-------
drivers/mtd/nand/spi/on-die-ecc-engine.c | 0
include/linux/mtd/nand.h | 1 +
include/linux/mtd/spinand.h | 9 ++
5 files changed, 141 insertions(+), 54 deletions(-)
create mode 100644 drivers/mtd/nand/spi/on-die-ecc-engine.c
--
2.20.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/5] mtd: spinand: Fix typo in comment
2020-09-30 15:41 [PATCH 0/5] Creation of a SPI-NAND ECC engine Miquel Raynal
@ 2020-09-30 15:41 ` Miquel Raynal
2020-10-30 17:28 ` Miquel Raynal
2020-09-30 15:41 ` [PATCH 2/5] mtd: spinand: Move ECC related definitions earlier in the driver Miquel Raynal
` (3 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Miquel Raynal @ 2020-09-30 15:41 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, linux-mtd
Cc: Julien Su, ycllin, Thomas Petazzoni
One comment in the SPI-NAND core is not very clear, fix it to ease the
understanding of what the block does.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
---
drivers/mtd/nand/spi/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index 0939e0f9c6a4..ee558518c704 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -1069,7 +1069,7 @@ static int spinand_init(struct spinand_device *spinand)
/*
* Right now, we don't support ECC, so let the whole oob
- * area is available for user.
+ * area available for the user.
*/
mtd->_read_oob = spinand_mtd_read;
mtd->_write_oob = spinand_mtd_write;
--
2.20.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/5] mtd: spinand: Move ECC related definitions earlier in the driver
2020-09-30 15:41 [PATCH 0/5] Creation of a SPI-NAND ECC engine Miquel Raynal
2020-09-30 15:41 ` [PATCH 1/5] mtd: spinand: Fix typo in comment Miquel Raynal
@ 2020-09-30 15:41 ` Miquel Raynal
2020-09-30 18:52 ` Thomas Petazzoni
2020-10-30 17:28 ` Miquel Raynal
2020-09-30 15:41 ` [PATCH 3/5] mtd: spinand: Instantiate a SPI-NAND on-die ECC engine Miquel Raynal
` (2 subsequent siblings)
4 siblings, 2 replies; 13+ messages in thread
From: Miquel Raynal @ 2020-09-30 15:41 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, linux-mtd
Cc: Julien Su, ycllin, Thomas Petazzoni
Prepare the creation of a SPI-NAND on-die ECC engine by gathering the
ECC-related code earlier enough in the core to avoid the need for
forward declarations.
The next step is to actually create that engine by implementing the
generic ECC interface.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
drivers/mtd/nand/spi/core.c | 106 +++++++++++------------
drivers/mtd/nand/spi/on-die-ecc-engine.c | 0
2 files changed, 53 insertions(+), 53 deletions(-)
create mode 100644 drivers/mtd/nand/spi/on-die-ecc-engine.c
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index ee558518c704..f5cf16a47eda 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -193,6 +193,59 @@ static int spinand_ecc_enable(struct spinand_device *spinand,
enable ? CFG_ECC_ENABLE : 0);
}
+static int spinand_check_ecc_status(struct spinand_device *spinand, u8 status)
+{
+ struct nand_device *nand = spinand_to_nand(spinand);
+
+ if (spinand->eccinfo.get_status)
+ return spinand->eccinfo.get_status(spinand, status);
+
+ switch (status & STATUS_ECC_MASK) {
+ case STATUS_ECC_NO_BITFLIPS:
+ return 0;
+
+ case STATUS_ECC_HAS_BITFLIPS:
+ /*
+ * We have no way to know exactly how many bitflips have been
+ * fixed, so let's return the maximum possible value so that
+ * wear-leveling layers move the data immediately.
+ */
+ return nanddev_get_ecc_conf(nand)->strength;
+
+ case STATUS_ECC_UNCOR_ERROR:
+ return -EBADMSG;
+
+ default:
+ break;
+ }
+
+ return -EINVAL;
+}
+
+static int spinand_noecc_ooblayout_ecc(struct mtd_info *mtd, int section,
+ struct mtd_oob_region *region)
+{
+ return -ERANGE;
+}
+
+static int spinand_noecc_ooblayout_free(struct mtd_info *mtd, int section,
+ struct mtd_oob_region *region)
+{
+ if (section)
+ return -ERANGE;
+
+ /* Reserve 2 bytes for the BBM. */
+ region->offset = 2;
+ region->length = 62;
+
+ return 0;
+}
+
+static const struct mtd_ooblayout_ops spinand_noecc_ooblayout = {
+ .ecc = spinand_noecc_ooblayout_ecc,
+ .free = spinand_noecc_ooblayout_free,
+};
+
static int spinand_write_enable_op(struct spinand_device *spinand)
{
struct spi_mem_op op = SPINAND_WR_EN_DIS_OP(true);
@@ -402,35 +455,6 @@ static int spinand_lock_block(struct spinand_device *spinand, u8 lock)
return spinand_write_reg_op(spinand, REG_BLOCK_LOCK, lock);
}
-static int spinand_check_ecc_status(struct spinand_device *spinand, u8 status)
-{
- struct nand_device *nand = spinand_to_nand(spinand);
-
- if (spinand->eccinfo.get_status)
- return spinand->eccinfo.get_status(spinand, status);
-
- switch (status & STATUS_ECC_MASK) {
- case STATUS_ECC_NO_BITFLIPS:
- return 0;
-
- case STATUS_ECC_HAS_BITFLIPS:
- /*
- * We have no way to know exactly how many bitflips have been
- * fixed, so let's return the maximum possible value so that
- * wear-leveling layers move the data immediately.
- */
- return nanddev_get_ecc_conf(nand)->strength;
-
- case STATUS_ECC_UNCOR_ERROR:
- return -EBADMSG;
-
- default:
- break;
- }
-
- return -EINVAL;
-}
-
static int spinand_read_page(struct spinand_device *spinand,
const struct nand_page_io_req *req,
bool ecc_enabled)
@@ -966,30 +990,6 @@ static int spinand_detect(struct spinand_device *spinand)
return 0;
}
-static int spinand_noecc_ooblayout_ecc(struct mtd_info *mtd, int section,
- struct mtd_oob_region *region)
-{
- return -ERANGE;
-}
-
-static int spinand_noecc_ooblayout_free(struct mtd_info *mtd, int section,
- struct mtd_oob_region *region)
-{
- if (section)
- return -ERANGE;
-
- /* Reserve 2 bytes for the BBM. */
- region->offset = 2;
- region->length = 62;
-
- return 0;
-}
-
-static const struct mtd_ooblayout_ops spinand_noecc_ooblayout = {
- .ecc = spinand_noecc_ooblayout_ecc,
- .free = spinand_noecc_ooblayout_free,
-};
-
static int spinand_init(struct spinand_device *spinand)
{
struct device *dev = &spinand->spimem->spi->dev;
diff --git a/drivers/mtd/nand/spi/on-die-ecc-engine.c b/drivers/mtd/nand/spi/on-die-ecc-engine.c
new file mode 100644
index 000000000000..e69de29bb2d1
--
2.20.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/5] mtd: spinand: Instantiate a SPI-NAND on-die ECC engine
2020-09-30 15:41 [PATCH 0/5] Creation of a SPI-NAND ECC engine Miquel Raynal
2020-09-30 15:41 ` [PATCH 1/5] mtd: spinand: Fix typo in comment Miquel Raynal
2020-09-30 15:41 ` [PATCH 2/5] mtd: spinand: Move ECC related definitions earlier in the driver Miquel Raynal
@ 2020-09-30 15:41 ` Miquel Raynal
2020-10-30 17:28 ` Miquel Raynal
2020-09-30 15:41 ` [PATCH 4/5] mtd: nand: Let on-die ECC engines be retrieved from the NAND core Miquel Raynal
2020-09-30 15:41 ` [PATCH 5/5] mtd: spinand: Fill a default ECC provider/algorithm Miquel Raynal
4 siblings, 1 reply; 13+ messages in thread
From: Miquel Raynal @ 2020-09-30 15:41 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, linux-mtd
Cc: Julien Su, ycllin, Thomas Petazzoni
Make use of the existing functions taken from the SPI-NAND core to
instantiate an on-die ECC engine specific to the SPI-NAND core. The
next step will be to tweak the core to use this object instead of
calling the helpers directly.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
drivers/mtd/nand/spi/core.c | 67 +++++++++++++++++++++++++++++++++++++
include/linux/mtd/spinand.h | 9 +++++
2 files changed, 76 insertions(+)
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index f5cf16a47eda..668441d483e3 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -246,6 +246,73 @@ static const struct mtd_ooblayout_ops spinand_noecc_ooblayout = {
.free = spinand_noecc_ooblayout_free,
};
+static int spinand_ondie_ecc_init_ctx(struct nand_device *nand)
+{
+ struct spinand_device *spinand = nand_to_spinand(nand);
+ struct mtd_info *mtd = nanddev_to_mtd(nand);
+ struct spinand_ondie_ecc_conf *engine_conf;
+
+ nand->ecc.ctx.conf.engine_type = NAND_ECC_ENGINE_TYPE_ON_DIE;
+ nand->ecc.ctx.conf.step_size = nand->ecc.requirements.step_size;
+ nand->ecc.ctx.conf.strength = nand->ecc.requirements.strength;
+
+ engine_conf = kzalloc(sizeof(*engine_conf), GFP_KERNEL);
+ if (!engine_conf)
+ return -ENOMEM;
+
+ nand->ecc.ctx.priv = engine_conf;
+
+ if (spinand->eccinfo.ooblayout)
+ mtd_set_ooblayout(mtd, spinand->eccinfo.ooblayout);
+ else
+ mtd_set_ooblayout(mtd, &spinand_noecc_ooblayout);
+
+ return 0;
+}
+
+static void spinand_ondie_ecc_cleanup_ctx(struct nand_device *nand)
+{
+ kfree(nand->ecc.ctx.priv);
+}
+
+static int spinand_ondie_ecc_prepare_io_req(struct nand_device *nand,
+ struct nand_page_io_req *req)
+{
+ struct spinand_device *spinand = nand_to_spinand(nand);
+ bool enable = (req->mode != MTD_OPS_RAW);
+
+ /* Only enable or disable the engine */
+ return spinand_ecc_enable(spinand, enable);
+}
+
+static int spinand_ondie_ecc_finish_io_req(struct nand_device *nand,
+ struct nand_page_io_req *req)
+{
+ struct spinand_ondie_ecc_conf *engine_conf = nand->ecc.ctx.priv;
+ struct spinand_device *spinand = nand_to_spinand(nand);
+
+ if (req->mode == MTD_OPS_RAW)
+ return 0;
+
+ /* Nothing to do when finishing a page write */
+ if (req->type == NAND_PAGE_WRITE)
+ return 0;
+
+ /* Finish a page write: check the status, report errors/bitflips */
+ return spinand_check_ecc_status(spinand, engine_conf->status);
+}
+
+static struct nand_ecc_engine_ops spinand_ondie_ecc_engine_ops = {
+ .init_ctx = spinand_ondie_ecc_init_ctx,
+ .cleanup_ctx = spinand_ondie_ecc_cleanup_ctx,
+ .prepare_io_req = spinand_ondie_ecc_prepare_io_req,
+ .finish_io_req = spinand_ondie_ecc_finish_io_req,
+};
+
+static __maybe_unused struct nand_ecc_engine spinand_ondie_ecc_engine = {
+ .ops = &spinand_ondie_ecc_engine_ops,
+};
+
static int spinand_write_enable_op(struct spinand_device *spinand)
{
struct spi_mem_op op = SPINAND_WR_EN_DIS_OP(true);
diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h
index 7b78c4ba9b3e..6bb92f26833e 100644
--- a/include/linux/mtd/spinand.h
+++ b/include/linux/mtd/spinand.h
@@ -286,6 +286,15 @@ struct spinand_ecc_info {
#define SPINAND_HAS_QE_BIT BIT(0)
#define SPINAND_HAS_CR_FEAT_BIT BIT(1)
+/**
+ * struct spinand_ondie_ecc_conf - private SPI-NAND on-die ECC engine structure
+ * @status: status of the last wait operation that will be used in case
+ * ->get_status() is not populated by the spinand device.
+ */
+struct spinand_ondie_ecc_conf {
+ u8 status;
+};
+
/**
* struct spinand_info - Structure used to describe SPI NAND chips
* @model: model name
--
2.20.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/5] mtd: nand: Let on-die ECC engines be retrieved from the NAND core
2020-09-30 15:41 [PATCH 0/5] Creation of a SPI-NAND ECC engine Miquel Raynal
` (2 preceding siblings ...)
2020-09-30 15:41 ` [PATCH 3/5] mtd: spinand: Instantiate a SPI-NAND on-die ECC engine Miquel Raynal
@ 2020-09-30 15:41 ` Miquel Raynal
2020-10-30 17:28 ` Miquel Raynal
2020-09-30 15:41 ` [PATCH 5/5] mtd: spinand: Fill a default ECC provider/algorithm Miquel Raynal
4 siblings, 1 reply; 13+ messages in thread
From: Miquel Raynal @ 2020-09-30 15:41 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, linux-mtd
Cc: Julien Su, ycllin, Thomas Petazzoni
Before making use of the ECC engines, we must retrieve them. Add the
necessary boilerplate.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
drivers/mtd/nand/ecc.c | 6 ++++++
include/linux/mtd/nand.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/drivers/mtd/nand/ecc.c b/drivers/mtd/nand/ecc.c
index 57bc8c5ef08c..9afdde70824a 100644
--- a/drivers/mtd/nand/ecc.c
+++ b/drivers/mtd/nand/ecc.c
@@ -605,6 +605,12 @@ struct nand_ecc_engine *nand_ecc_get_sw_engine(struct nand_device *nand)
}
EXPORT_SYMBOL(nand_ecc_get_sw_engine);
+struct nand_ecc_engine *nand_ecc_get_on_die_hw_engine(struct nand_device *nand)
+{
+ return nand->ecc.ondie_engine;
+}
+EXPORT_SYMBOL(nand_ecc_get_on_die_hw_engine);
+
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Miquel Raynal <miquel.raynal@bootlin.com>");
MODULE_DESCRIPTION("Generic ECC engine");
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index f78f61c9a9ee..6c6f91c03c42 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -278,6 +278,7 @@ int nand_ecc_finish_io_req(struct nand_device *nand,
struct nand_page_io_req *req);
bool nand_ecc_is_strong_enough(struct nand_device *nand);
struct nand_ecc_engine *nand_ecc_get_sw_engine(struct nand_device *nand);
+struct nand_ecc_engine *nand_ecc_get_on_die_hw_engine(struct nand_device *nand);
#if IS_ENABLED(CONFIG_MTD_NAND_ECC_SW_HAMMING)
struct nand_ecc_engine *nand_ecc_sw_hamming_get_engine(void);
--
2.20.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 5/5] mtd: spinand: Fill a default ECC provider/algorithm
2020-09-30 15:41 [PATCH 0/5] Creation of a SPI-NAND ECC engine Miquel Raynal
` (3 preceding siblings ...)
2020-09-30 15:41 ` [PATCH 4/5] mtd: nand: Let on-die ECC engines be retrieved from the NAND core Miquel Raynal
@ 2020-09-30 15:41 ` Miquel Raynal
2020-10-30 17:28 ` Miquel Raynal
4 siblings, 1 reply; 13+ messages in thread
From: Miquel Raynal @ 2020-09-30 15:41 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, linux-mtd
Cc: Julien Su, ycllin, Thomas Petazzoni
The SPI-NAND layer default is on-die ECC because until now it was the
only one supported. New SPI-NAND chip flavors might use something else
as ECC engine provider but this will always be the default if the user
does not choose explicitly something else.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
drivers/mtd/nand/spi/core.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index 668441d483e3..916335c510d3 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -309,7 +309,7 @@ static struct nand_ecc_engine_ops spinand_ondie_ecc_engine_ops = {
.finish_io_req = spinand_ondie_ecc_finish_io_req,
};
-static __maybe_unused struct nand_ecc_engine spinand_ondie_ecc_engine = {
+static struct nand_ecc_engine spinand_ondie_ecc_engine = {
.ops = &spinand_ondie_ecc_engine_ops,
};
@@ -1134,6 +1134,10 @@ static int spinand_init(struct spinand_device *spinand)
if (ret)
goto err_manuf_cleanup;
+ /* SPI-NAND default ECC engine is on-die */
+ nand->ecc.defaults.engine_type = NAND_ECC_ENGINE_TYPE_ON_DIE;
+ nand->ecc.ondie_engine = &spinand_ondie_ecc_engine;
+
/*
* Right now, we don't support ECC, so let the whole oob
* area available for the user.
--
2.20.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 2/5] mtd: spinand: Move ECC related definitions earlier in the driver
2020-09-30 15:41 ` [PATCH 2/5] mtd: spinand: Move ECC related definitions earlier in the driver Miquel Raynal
@ 2020-09-30 18:52 ` Thomas Petazzoni
2020-10-01 8:36 ` Miquel Raynal
2020-10-30 17:28 ` Miquel Raynal
1 sibling, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2020-09-30 18:52 UTC (permalink / raw)
To: Miquel Raynal
Cc: Vignesh Raghavendra, Tudor Ambarus, Julien Su,
Richard Weinberger, ycllin, linux-mtd
On Wed, 30 Sep 2020 17:41:06 +0200
Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> Prepare the creation of a SPI-NAND on-die ECC engine by gathering the
> ECC-related code earlier enough in the core to avoid the need for
> forward declarations.
>
> The next step is to actually create that engine by implementing the
> generic ECC interface.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> drivers/mtd/nand/spi/core.c | 106 +++++++++++------------
> drivers/mtd/nand/spi/on-die-ecc-engine.c | 0
> 2 files changed, 53 insertions(+), 53 deletions(-)
> create mode 100644 drivers/mtd/nand/spi/on-die-ecc-engine.c
You're adding an empty on-die-ecc-engine.c file in this commit.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/5] mtd: spinand: Move ECC related definitions earlier in the driver
2020-09-30 18:52 ` Thomas Petazzoni
@ 2020-10-01 8:36 ` Miquel Raynal
0 siblings, 0 replies; 13+ messages in thread
From: Miquel Raynal @ 2020-10-01 8:36 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Vignesh Raghavendra, Tudor Ambarus, Julien Su,
Richard Weinberger, ycllin, linux-mtd
Hi Thomas,
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote on Wed, 30 Sep
2020 20:52:26 +0200:
> On Wed, 30 Sep 2020 17:41:06 +0200
> Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> > Prepare the creation of a SPI-NAND on-die ECC engine by gathering the
> > ECC-related code earlier enough in the core to avoid the need for
> > forward declarations.
> >
> > The next step is to actually create that engine by implementing the
> > generic ECC interface.
> >
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> > drivers/mtd/nand/spi/core.c | 106 +++++++++++------------
> > drivers/mtd/nand/spi/on-die-ecc-engine.c | 0
> > 2 files changed, 53 insertions(+), 53 deletions(-)
> > create mode 100644 drivers/mtd/nand/spi/on-die-ecc-engine.c
>
> You're adding an empty on-die-ecc-engine.c file in this commit.
>
> Thomas
Mmmh, this is a left over from a previous implementation, I didn't see
it in the diff, thanks for spotting it!
Cheers,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 5/5] mtd: spinand: Fill a default ECC provider/algorithm
2020-09-30 15:41 ` [PATCH 5/5] mtd: spinand: Fill a default ECC provider/algorithm Miquel Raynal
@ 2020-10-30 17:28 ` Miquel Raynal
0 siblings, 0 replies; 13+ messages in thread
From: Miquel Raynal @ 2020-10-30 17:28 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Tudor Ambarus, linux-mtd
Cc: Julien Su, ycllin, Thomas Petazzoni
On Wed, 2020-09-30 at 15:41:09 UTC, Miquel Raynal wrote:
> The SPI-NAND layer default is on-die ECC because until now it was the
> only one supported. New SPI-NAND chip flavors might use something else
> as ECC engine provider but this will always be the default if the user
> does not choose explicitly something else.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/5] mtd: nand: Let on-die ECC engines be retrieved from the NAND core
2020-09-30 15:41 ` [PATCH 4/5] mtd: nand: Let on-die ECC engines be retrieved from the NAND core Miquel Raynal
@ 2020-10-30 17:28 ` Miquel Raynal
0 siblings, 0 replies; 13+ messages in thread
From: Miquel Raynal @ 2020-10-30 17:28 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Tudor Ambarus, linux-mtd
Cc: Julien Su, ycllin, Thomas Petazzoni
On Wed, 2020-09-30 at 15:41:08 UTC, Miquel Raynal wrote:
> Before making use of the ECC engines, we must retrieve them. Add the
> necessary boilerplate.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/5] mtd: spinand: Instantiate a SPI-NAND on-die ECC engine
2020-09-30 15:41 ` [PATCH 3/5] mtd: spinand: Instantiate a SPI-NAND on-die ECC engine Miquel Raynal
@ 2020-10-30 17:28 ` Miquel Raynal
0 siblings, 0 replies; 13+ messages in thread
From: Miquel Raynal @ 2020-10-30 17:28 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Tudor Ambarus, linux-mtd
Cc: Julien Su, ycllin, Thomas Petazzoni
On Wed, 2020-09-30 at 15:41:07 UTC, Miquel Raynal wrote:
> Make use of the existing functions taken from the SPI-NAND core to
> instantiate an on-die ECC engine specific to the SPI-NAND core. The
> next step will be to tweak the core to use this object instead of
> calling the helpers directly.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/5] mtd: spinand: Move ECC related definitions earlier in the driver
2020-09-30 15:41 ` [PATCH 2/5] mtd: spinand: Move ECC related definitions earlier in the driver Miquel Raynal
2020-09-30 18:52 ` Thomas Petazzoni
@ 2020-10-30 17:28 ` Miquel Raynal
1 sibling, 0 replies; 13+ messages in thread
From: Miquel Raynal @ 2020-10-30 17:28 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Tudor Ambarus, linux-mtd
Cc: Julien Su, ycllin, Thomas Petazzoni
On Wed, 2020-09-30 at 15:41:06 UTC, Miquel Raynal wrote:
> Prepare the creation of a SPI-NAND on-die ECC engine by gathering the
> ECC-related code earlier enough in the core to avoid the need for
> forward declarations.
>
> The next step is to actually create that engine by implementing the
> generic ECC interface.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/5] mtd: spinand: Fix typo in comment
2020-09-30 15:41 ` [PATCH 1/5] mtd: spinand: Fix typo in comment Miquel Raynal
@ 2020-10-30 17:28 ` Miquel Raynal
0 siblings, 0 replies; 13+ messages in thread
From: Miquel Raynal @ 2020-10-30 17:28 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Tudor Ambarus, linux-mtd
Cc: Julien Su, ycllin, Thomas Petazzoni
On Wed, 2020-09-30 at 15:41:05 UTC, Miquel Raynal wrote:
> One comment in the SPI-NAND core is not very clear, fix it to ease the
> understanding of what the block does.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2020-10-30 17:31 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30 15:41 [PATCH 0/5] Creation of a SPI-NAND ECC engine Miquel Raynal
2020-09-30 15:41 ` [PATCH 1/5] mtd: spinand: Fix typo in comment Miquel Raynal
2020-10-30 17:28 ` Miquel Raynal
2020-09-30 15:41 ` [PATCH 2/5] mtd: spinand: Move ECC related definitions earlier in the driver Miquel Raynal
2020-09-30 18:52 ` Thomas Petazzoni
2020-10-01 8:36 ` Miquel Raynal
2020-10-30 17:28 ` Miquel Raynal
2020-09-30 15:41 ` [PATCH 3/5] mtd: spinand: Instantiate a SPI-NAND on-die ECC engine Miquel Raynal
2020-10-30 17:28 ` Miquel Raynal
2020-09-30 15:41 ` [PATCH 4/5] mtd: nand: Let on-die ECC engines be retrieved from the NAND core Miquel Raynal
2020-10-30 17:28 ` Miquel Raynal
2020-09-30 15:41 ` [PATCH 5/5] mtd: spinand: Fill a default ECC provider/algorithm Miquel Raynal
2020-10-30 17:28 ` Miquel Raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).