[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250519154225.2928-1-vulab@iscas.ac.cn>
Date: Mon, 19 May 2025 23:42:24 +0800
From: Wentao Liang <vulab@...as.ac.cn>
To: miquel.raynal@...tlin.com,
richard@....at,
vigneshr@...com,
wens@...e.org,
jernej.skrabec@...il.com,
samuel@...lland.org,
ruanjinjie@...wei.com,
u.kleine-koenig@...libre.com
Cc: linux-mtd@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
linux-sunxi@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Wentao Liang <vulab@...as.ac.cn>,
stable@...r.kernel.org
Subject: [PATCH] mtd: nand: sunxi: Add randomizer configuration before randomizer enable
In sunxi_nfc_hw_ecc_read_chunk(), the sunxi_nfc_randomizer_enable() is
called without the config of randomizer. A proper implementation can be
found in sunxi_nfc_hw_ecc_read_chunks_dma().
Add sunxi_nfc_randomizer_config() before the start of randomization.
Fixes: 4be4e03efc7f ("mtd: nand: sunxi: add randomizer support")
Cc: stable@...r.kernel.org # v4.6
Signed-off-by: Wentao Liang <vulab@...as.ac.cn>
---
drivers/mtd/nand/raw/sunxi_nand.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index fab371e3e9b7..9179719f639e 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -817,6 +817,7 @@ static int sunxi_nfc_hw_ecc_read_chunk(struct nand_chip *nand,
if (ret)
return ret;
+ sunxi_nfc_randomizer_config(nand, page, false);
sunxi_nfc_randomizer_enable(nand);
writel(NFC_DATA_TRANS | NFC_DATA_SWAP_METHOD | NFC_ECC_OP,
nfc->regs + NFC_REG_CMD);
--
2.42.0.windows.2
Powered by blists - more mailing lists