From: Roger Quadros <rogerq@kernel.org>
To: miquel.raynal@bootlin.com, richard@nod.at
Cc: vigneshr@ti.com, kishon@ti.com, nm@ti.com, tony@atomide.com,
linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Roger Quadros <rogerq@kernel.org>
Subject: [PATCH v2 5/6] mtd: rawnand: omap2: fix force_8bit flag behaviour for DMA mode
Date: Thu, 9 Dec 2021 11:04:57 +0200 [thread overview]
Message-ID: <20211209090458.24830-6-rogerq@kernel.org> (raw)
In-Reply-To: <20211209090458.24830-1-rogerq@kernel.org>
In DMA mode we were not considering the force_8bit flag.
Fix it by using regular non-DMA 8-bit I/O if force_8bit flag is set.
Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
drivers/mtd/nand/raw/omap2.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/mtd/nand/raw/omap2.c b/drivers/mtd/nand/raw/omap2.c
index 0c7ee26171ad..2b58ddea3b01 100644
--- a/drivers/mtd/nand/raw/omap2.c
+++ b/drivers/mtd/nand/raw/omap2.c
@@ -447,6 +447,11 @@ static void omap_nand_data_in_dma_pref(struct nand_chip *chip, void *buf,
{
struct mtd_info *mtd = nand_to_mtd(chip);
+ if (force_8bit) {
+ omap_nand_data_in(chip, buf, len, force_8bit);
+ return;
+ }
+
if (len <= mtd->oobsize)
omap_nand_data_in_pref(chip, buf, len, false);
else
@@ -463,6 +468,11 @@ static void omap_nand_data_out_dma_pref(struct nand_chip *chip,
{
struct mtd_info *mtd = nand_to_mtd(chip);
+ if (force_8bit) {
+ omap_nand_data_out(chip, buf, len, force_8bit);
+ return;
+ }
+
if (len <= mtd->oobsize)
omap_nand_data_out_pref(chip, buf, len, false);
else
--
2.17.1
next prev parent reply other threads:[~2021-12-09 9:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 9:04 [PATCH v2 0/6] mtd: nand: omap2: Switch to exec_ops, support AM64 SoC Roger Quadros
2021-12-09 9:04 ` [PATCH v2 1/6] dt-bindings: mtd: ti,gpmc-nand: Add compatible for AM64 NAND Roger Quadros
2021-12-17 12:19 ` [PATCH v2 1/6] dt-bindings: mtd: ti, gpmc-nand: " Miquel Raynal
2021-12-09 9:04 ` [PATCH v2 2/6] mtd: rawnand: omap2: Allow build on K3 platforms Roger Quadros
2021-12-17 12:19 ` Miquel Raynal
2021-12-09 9:04 ` [PATCH v2 3/6] mtd: rawnand: omap2: move to exec_op interface Roger Quadros
2021-12-17 12:19 ` Miquel Raynal
2021-12-09 9:04 ` [PATCH v2 4/6] mtd: rawnand: omap2: Add compatible for AM64 SoC Roger Quadros
2021-12-17 12:19 ` Miquel Raynal
2021-12-09 9:04 ` Roger Quadros [this message]
2021-12-17 12:19 ` [PATCH v2 5/6] mtd: rawnand: omap2: fix force_8bit flag behaviour for DMA mode Miquel Raynal
2021-12-09 9:04 ` [PATCH v2 6/6] mtd: rawnand: omap2: drop unused variable Roger Quadros
2021-12-17 12:19 ` Miquel Raynal
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=20211209090458.24830-6-rogerq@kernel.org \
--to=rogerq@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=nm@ti.com \
--cc=richard@nod.at \
--cc=tony@atomide.com \
--cc=vigneshr@ti.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;
as well as URLs for NNTP newsgroup(s).