]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mtd: nand: mediatek: refine register NFI_PAGEFMT setting
authorXiaolei Li <xiaolei.li@mediatek.com>
Wed, 31 May 2017 08:26:39 +0000 (16:26 +0800)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Thu, 1 Jun 2017 08:09:37 +0000 (10:09 +0200)
The register NFI_PAGEFMT is always 32 bits length, so it is better to
do register program using writel() compare with writew().

Signed-off-by: Xiaolei Li <xiaolei.li@mediatek.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/mtk_nand.c

index 6c517c682939db436eb040e7481682c6ae309e69..c28f4b7025bfc53ff59aabc0c3c751a87a5a0a8c 100644 (file)
@@ -408,7 +408,7 @@ static int mtk_nfc_hw_runtime_config(struct mtd_info *mtd)
 
        fmt |= mtk_nand->fdm.reg_size << PAGEFMT_FDM_SHIFT;
        fmt |= mtk_nand->fdm.ecc_size << PAGEFMT_FDM_ECC_SHIFT;
-       nfi_writew(nfc, fmt, NFI_PAGEFMT);
+       nfi_writel(nfc, fmt, NFI_PAGEFMT);
 
        nfc->ecc_cfg.strength = chip->ecc.strength;
        nfc->ecc_cfg.len = chip->ecc.size + mtk_nand->fdm.ecc_size;
@@ -1009,7 +1009,7 @@ static inline void mtk_nfc_hw_init(struct mtk_nfc *nfc)
         * 0  : poll the status of the busy/ready signal after [7:4]*16 cycles.
         */
        nfi_writew(nfc, 0xf1, NFI_CNRNB);
-       nfi_writew(nfc, PAGEFMT_8K_16K, NFI_PAGEFMT);
+       nfi_writel(nfc, PAGEFMT_8K_16K, NFI_PAGEFMT);
 
        mtk_nfc_hw_reset(nfc);