[v3,1/4] mtd: rawnand: marvell: Handle on-die ECC
diff mbox series

Message ID 20180620050544.31549-2-chris.packham@alliedtelesis.co.nz
State Superseded
Delegated to: Miquel Raynal
Headers show
Series
  • mtd: rawnand: support MT29F1G08ABAFAWP-ITE:F
Related show

Commit Message

Chris Packham June 20, 2018, 5:05 a.m. UTC
From the controllers point of view this is the same as no or
software only ECC.

Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
Changes in v2:
- New
Changes in v3:
- Add review from Boris

 drivers/mtd/nand/raw/marvell_nand.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Boris Brezillon June 20, 2018, 7:46 a.m. UTC | #1
Hi Chris,

On Wed, 20 Jun 2018 17:05:41 +1200
Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:

> From the controllers point of view this is the same as no or
> software only ECC.
> 
> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>

I'm nitpicking, but we usually put the R-b/A-b tags after the author
SoB.

> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
> Changes in v2:
> - New
> Changes in v3:
> - Add review from Boris
> 
>  drivers/mtd/nand/raw/marvell_nand.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
> index ebb1d141b900..ba6889bbe802 100644
> --- a/drivers/mtd/nand/raw/marvell_nand.c
> +++ b/drivers/mtd/nand/raw/marvell_nand.c
> @@ -2157,6 +2157,7 @@ static int marvell_nand_ecc_init(struct mtd_info *mtd,
>  		break;
>  	case NAND_ECC_NONE:
>  	case NAND_ECC_SOFT:
> +	case NAND_ECC_ON_DIE:
>  		if (!nfc->caps->is_nfcv2 && mtd->writesize != SZ_512 &&
>  		    mtd->writesize != SZ_2K) {
>  			dev_err(nfc->dev, "NFCv1 cannot write %d bytes pages\n",
Chris Packham June 20, 2018, 9:10 p.m. UTC | #2
On 20/06/18 19:47, Boris Brezillon wrote:
> Hi Chris,
> 
> On Wed, 20 Jun 2018 17:05:41 +1200
> Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:
> 
>>  From the controllers point of view this is the same as no or
>> software only ECC.
>>
>> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
> 
> I'm nitpicking, but we usually put the R-b/A-b tags after the author
> SoB.

Yeah sorry force of habit from using gerrit internally. I'll try to 
re-train my fingers.

>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
>> ---
>> Changes in v2:
>> - New
>> Changes in v3:
>> - Add review from Boris
>>
>>   drivers/mtd/nand/raw/marvell_nand.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
>> index ebb1d141b900..ba6889bbe802 100644
>> --- a/drivers/mtd/nand/raw/marvell_nand.c
>> +++ b/drivers/mtd/nand/raw/marvell_nand.c
>> @@ -2157,6 +2157,7 @@ static int marvell_nand_ecc_init(struct mtd_info *mtd,
>>   		break;
>>   	case NAND_ECC_NONE:
>>   	case NAND_ECC_SOFT:
>> +	case NAND_ECC_ON_DIE:
>>   		if (!nfc->caps->is_nfcv2 && mtd->writesize != SZ_512 &&
>>   		    mtd->writesize != SZ_2K) {
>>   			dev_err(nfc->dev, "NFCv1 cannot write %d bytes pages\n",
> 
>

Patch
diff mbox series

diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
index ebb1d141b900..ba6889bbe802 100644
--- a/drivers/mtd/nand/raw/marvell_nand.c
+++ b/drivers/mtd/nand/raw/marvell_nand.c
@@ -2157,6 +2157,7 @@  static int marvell_nand_ecc_init(struct mtd_info *mtd,
 		break;
 	case NAND_ECC_NONE:
 	case NAND_ECC_SOFT:
+	case NAND_ECC_ON_DIE:
 		if (!nfc->caps->is_nfcv2 && mtd->writesize != SZ_512 &&
 		    mtd->writesize != SZ_2K) {
 			dev_err(nfc->dev, "NFCv1 cannot write %d bytes pages\n",