mtd: nand: mediatek: refine register NFI_PAGEFMT setting
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Thu Jul 13 10:59:17 PDT 2017
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=582212ceb9bcd9ef0808497a8e066c4eef442e19
Commit: 582212ceb9bcd9ef0808497a8e066c4eef442e19
Parent: 2968698ba03187b09e84fbc709f0b5d19ddd94ff
Author: Xiaolei Li <xiaolei.li at mediatek.com>
AuthorDate: Wed May 31 16:26:39 2017 +0800
Committer: Boris Brezillon <boris.brezillon at free-electrons.com>
CommitDate: Thu Jun 1 10:09:37 2017 +0200
mtd: nand: mediatek: refine register NFI_PAGEFMT setting
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 at mediatek.com>
Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
---
drivers/mtd/nand/mtk_nand.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/mtk_nand.c
index 6c517c6..c28f4b7 100644
--- a/drivers/mtd/nand/mtk_nand.c
+++ b/drivers/mtd/nand/mtk_nand.c
@@ -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);
More information about the linux-mtd-cvs
mailing list