public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: andrea.scian@dave.eu, Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	"Mahapatra, Amit Kumar" <amit.kumar-mahapatra@amd.com>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] mtd: rawnand: pl353: Fix software ECC support
Date: Fri, 23 Jan 2026 10:54:10 +0100	[thread overview]
Message-ID: <201afe7b-1fe8-4bf8-93ba-4810f26ceb6b@amd.com> (raw)
In-Reply-To: <20260121-pl353-soft-ecc-support-v1-1-00ad8e160d83@dave.eu>

+Amit,

On 1/21/26 16:51, Andrea Scian via B4 Relay wrote:
> From: Andrea Scian <andrea.scian@dave.eu>
> 
> We need to set another couple of fields in ecc structure to allow
> choosing SW ECC instead of HW one, otherwise write operation fail.
> 
> Signed-off-by: Andrea Scian <andrea.scian@dave.eu>
> ---
>   drivers/mtd/nand/raw/pl35x-nand-controller.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/nand/raw/pl35x-nand-controller.c b/drivers/mtd/nand/raw/pl35x-nand-controller.c
> index 11bd90e3f18cb..fcb62b9ec947b 100644
> --- a/drivers/mtd/nand/raw/pl35x-nand-controller.c
> +++ b/drivers/mtd/nand/raw/pl35x-nand-controller.c
> @@ -976,6 +976,8 @@ static int pl35x_nand_attach_chip(struct nand_chip *chip)
>   		fallthrough;
>   	case NAND_ECC_ENGINE_TYPE_NONE:
>   	case NAND_ECC_ENGINE_TYPE_SOFT:
> +		chip->ecc.algo = NAND_ECC_ALGO_HAMMING;
> +		chip->ecc.write_page_raw = nand_monolithic_write_page_raw;
>   		break;
>   	case NAND_ECC_ENGINE_TYPE_ON_HOST:
>   		ret = pl35x_nand_init_hw_ecc_controller(nfc, chip);
> 

Amit: Can you please test this and review it?

Thanks,
Michal

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2026-01-23  9:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-21 15:51 [PATCH 0/2] PL353 SW ECC fixes Andrea Scian via B4 Relay
2026-01-21 15:51 ` [PATCH 1/2] mtd: rawnand: pl353: Fix software ECC support Andrea Scian via B4 Relay
2026-01-23  9:54   ` Michal Simek [this message]
2026-01-21 15:51 ` [PATCH 2/2] mtd: rawnand: pl353: Add message about ECC mode Andrea Scian via B4 Relay
2026-01-23  9:46   ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201afe7b-1fe8-4bf8-93ba-4810f26ceb6b@amd.com \
    --to=michal.simek@amd.com \
    --cc=amit.kumar-mahapatra@amd.com \
    --cc=andrea.scian@dave.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox