From: Xiaolei Li <xiaolei.li@mediatek.com>
To: <boris.brezillon@free-electrons.com>,
<computersforpeace@gmail.com>, <matthias.bgg@gmail.com>
Cc: <dwmw2@infradead.org>, <linux-mtd@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>, <robh+dt@kernel.org>,
<rogercc.lin@mediatek.com>, <yt.shen@mediatek.com>,
<srv_heupstream@mediatek.com>, <xiaolei.li@mediatek.com>
Subject: [PATCH v5 2/4] mtd: nand: mediatek: refine register NFI_PAGEFMT setting
Date: Wed, 31 May 2017 16:26:39 +0800 [thread overview]
Message-ID: <1496219201-45414-3-git-send-email-xiaolei.li@mediatek.com> (raw)
In-Reply-To: <1496219201-45414-1-git-send-email-xiaolei.li@mediatek.com>
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>
---
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);
--
1.9.1
next prev parent reply other threads:[~2017-05-31 8:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-31 8:26 [PATCH v5 0/4] Mediatek MT2712 NAND FLASH Controller driver Xiaolei Li
2017-05-31 8:26 ` [PATCH v5 1/4] mtd: nand: mediatek: update DT bindings Xiaolei Li
2017-05-31 8:26 ` Xiaolei Li [this message]
2017-05-31 8:26 ` [PATCH v5 3/4] mtd: nand: mediatek: add support for different MTK NAND FLASH Controller IP Xiaolei Li
2017-05-31 8:26 ` [PATCH v5 4/4] mtd: nand: mediatek: add support for MT2712 NAND FLASH Controller Xiaolei Li
2017-05-31 14:32 ` [PATCH v5 0/4] Mediatek MT2712 NAND FLASH Controller driver Boris Brezillon
2017-06-01 0:51 ` xiaolei li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1496219201-45414-3-git-send-email-xiaolei.li@mediatek.com \
--to=xiaolei.li@mediatek.com \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=robh+dt@kernel.org \
--cc=rogercc.lin@mediatek.com \
--cc=srv_heupstream@mediatek.com \
--cc=yt.shen@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox