From: Xiaolei Li <xiaolei.li@mediatek.com>
To: boris.brezillon@free-electrons.com, computersforpeace@gmail.com,
matthias.bgg@gmail.com
Cc: srv_heupstream@mediatek.com, robh+dt@kernel.org,
linux-mtd@lists.infradead.org, yt.shen@mediatek.com,
linux-mediatek@lists.infradead.org, xiaolei.li@mediatek.com,
dwmw2@infradead.org, rogercc.lin@mediatek.com
Subject: [PATCH v3 2/4] mtd: nand: mediatek: refine register NFI_PAGEFMT setting
Date: Mon, 15 May 2017 20:39:37 +0800 [thread overview]
Message-ID: <1494851979-14416-3-git-send-email-xiaolei.li@mediatek.com> (raw)
In-Reply-To: <1494851979-14416-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
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2017-05-15 12:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-15 12:39 [PATCH v3 0/4] Mediatek MT2712 NAND FLASH Controller driver Xiaolei Li
2017-05-15 12:39 ` Xiaolei Li [this message]
[not found] ` <1494851979-14416-1-git-send-email-xiaolei.li-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-05-15 12:39 ` [PATCH v3 1/4] mtd: nand: mediatek: update DT bindings Xiaolei Li
[not found] ` <1494851979-14416-2-git-send-email-xiaolei.li-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-05-16 6:20 ` Matthias Brugger
2017-05-15 12:39 ` [PATCH v3 3/4] mtd: nand: mediatek: add support for different MTK NAND FLASH Controller IP Xiaolei Li
[not found] ` <1494851979-14416-4-git-send-email-xiaolei.li-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2017-05-29 16:48 ` Boris Brezillon
2017-05-31 3:15 ` xiaolei li
2017-05-15 12:39 ` [PATCH v3 4/4] mtd: nand: mediatek: add support for MT2712 NAND FLASH Controller 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=1494851979-14416-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