summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWentao Liang <vulab@iscas.ac.cn>2025-05-19 23:42:24 +0800
committerMiquel Raynal <miquel.raynal@bootlin.com>2025-05-20 17:32:20 +0200
commit4a5a99bc79cdc4be63933653682b0261a67a0c9f (patch)
treecd2ed39a180cb85ef94caa97bd6d626b0fd3823b
parentdd26402642a0899fde59ea6b0852fad3d799b4cc (diff)
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@vger.kernel.org # v4.6 Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
-rw-r--r--drivers/mtd/nand/raw/sunxi_nand.c1
1 files changed, 1 insertions, 0 deletions
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);