diff mbox series

[RESEND,v5,01/10] spi: mtk-snfi: Change default page format to setup default setting

Message ID 20230130030656.12127-2-xiangsheng.hou@mediatek.com (mailing list archive)
State Accepted
Commit 2b1e19811a8ecc776d15da4ca89df48db6974d66
Headers show
Series Add MediaTek MT7986 SPI NAND and ECC support | expand

Commit Message

Xiangsheng Hou Jan. 30, 2023, 3:06 a.m. UTC
Change default page format to setup default setting since the sector
size 1024 on MT7986 will lead to probe fail.

Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
 drivers/spi/spi-mtk-snfi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series


diff --git a/drivers/spi/spi-mtk-snfi.c b/drivers/spi/spi-mtk-snfi.c
index fa8412ba20e2..719fc6f53ab1 100644
--- a/drivers/spi/spi-mtk-snfi.c
+++ b/drivers/spi/spi-mtk-snfi.c
@@ -1430,8 +1430,7 @@  static int mtk_snand_probe(struct platform_device *pdev)
 	// setup an initial page format for ops matching page_cache_op template
 	// before ECC is called.
-	ret = mtk_snand_setup_pagefmt(ms, ms->caps->sector_size,
-				      ms->caps->spare_sizes[0]);
+	ret = mtk_snand_setup_pagefmt(ms, SZ_2K, SZ_64);
 	if (ret) {
 		dev_err(ms->dev, "failed to set initial page format\n");
 		goto disable_clk;