spi: mtk-snfi: Change default page format to setup default setting
authorXiangsheng Hou <xiangsheng.hou@mediatek.com>
Wed, 1 Feb 2023 02:09:17 +0000 (10:09 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 9 Feb 2023 17:07:19 +0000 (17:07 +0000)
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>
Link: https://lore.kernel.org/r/20230201020921.26712-2-xiangsheng.hou@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mtk-snfi.c

index fa8412b..719fc6f 100644 (file)
@@ -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;