Some chips, e.g. Micron MT29F1G08ABBFAH4, has a mandatory on-die ECC.
Add "on-die" as ECC engine type in order to be compatible with those.
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
drivers/mtd/nand/raw/davinci_nand.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c
index 392678143a36b20b42c1827eee8203dc2e41889a..79e768d337ae12f6e8d7f21f1acd4e259f4f3020 100644
--- a/drivers/mtd/nand/raw/davinci_nand.c
+++ b/drivers/mtd/nand/raw/davinci_nand.c
@@ -66,6 +66,7 @@ struct davinci_nand_pdata {
/* none == NAND_ECC_ENGINE_TYPE_NONE (strongly *not* advised!!)
* soft == NAND_ECC_ENGINE_TYPE_SOFT
+ * on-die == NAND_ECC_ENGINE_TYPE_ON_DIE
* else == NAND_ECC_ENGINE_TYPE_ON_HOST, according to ecc_bits
*
* All DaVinci-family chips support 1-bit hardware ECC.
@@ -524,6 +525,8 @@ static struct davinci_nand_pdata
pdata->engine_type = NAND_ECC_ENGINE_TYPE_SOFT;
if (!strncmp("hw", mode, 2))
pdata->engine_type = NAND_ECC_ENGINE_TYPE_ON_HOST;
+ if (!strncmp("on-die", mode, 6))
+ pdata->engine_type = NAND_ECC_ENGINE_TYPE_ON_DIE;
}
if (!of_property_read_u32(pdev->dev.of_node,
"ti,davinci-ecc-bits", &prop))
@@ -580,6 +583,7 @@ static int davinci_nand_attach_chip(struct nand_chip *chip)
switch (chip->ecc.engine_type) {
case NAND_ECC_ENGINE_TYPE_NONE:
+ case NAND_ECC_ENGINE_TYPE_ON_DIE:
pdata->ecc_bits = 0;
break;
case NAND_ECC_ENGINE_TYPE_SOFT:
@@ -914,4 +918,3 @@ module_platform_driver(nand_davinci_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Texas Instruments");
MODULE_DESCRIPTION("Davinci NAND flash driver");
-
--
2.47.0
On Thu, Nov 07, 2024 at 02:47:07PM +0100, Marcus Folkesson wrote: > Some chips, e.g. Micron MT29F1G08ABBFAH4, has a mandatory on-die ECC. > Add "on-die" as ECC engine type in order to be compatible with those. > > Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> > --- Can someone please take a look at this patch? Thanks, Marcus Folkesson
On 15/11/2024 at 09:52:55 +01, Marcus Folkesson <marcus.folkesson@gmail.com> wrote: > On Thu, Nov 07, 2024 at 02:47:07PM +0100, Marcus Folkesson wrote: >> Some chips, e.g. Micron MT29F1G08ABBFAH4, has a mandatory on-die ECC. >> Add "on-die" as ECC engine type in order to be compatible with those. >> >> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> >> --- > > Can someone please take a look at this patch? Well, it's v7, so I believe we've given attention to this patchset :-) Also, please consider 2 weeks as a better delay for pings. It is flagged "okay" on my side, but will only be applied after -rc1 unless I get negative feedback about it in the mean time. Thanks, Miquèl
© 2016 - 2024 Red Hat, Inc.