diff options
author | Roger Quadros <rogerq@kernel.org> | 2021-12-09 11:04:57 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2021-12-17 11:26:03 +0100 |
commit | 4695a3cf004a44a8d196d7c2f23d46efca0f92e3 (patch) | |
tree | 91336e0031696cc5a2d2d02c2e8bfb2310790813 | |
parent | 0137c74ad87316305599df8ada54de5273d868ec (diff) | |
download | linux-stable-4695a3cf004a44a8d196d7c2f23d46efca0f92e3.tar.gz linux-stable-4695a3cf004a44a8d196d7c2f23d46efca0f92e3.tar.bz2 linux-stable-4695a3cf004a44a8d196d7c2f23d46efca0f92e3.zip |
mtd: rawnand: omap2: fix force_8bit flag behaviour for DMA mode
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>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20211209090458.24830-6-rogerq@kernel.org
-rw-r--r-- | drivers/mtd/nand/raw/omap2.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 |