From: Tudor Ambarus <tudor.ambarus@microchip.com>
To: <miquel.raynal@bootlin.com>, <boris.brezillon@collabora.com>
Cc: alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com,
linux-mtd@lists.infradead.org, nicolas.ferre@microchip.com,
Tudor Ambarus <tudor.ambarus@microchip.com>
Subject: [PATCH v4 3/6] mtd: rawnand: atmel: Use nand_{write,read}_data_op()
Date: Mon, 20 Jul 2020 07:27:56 +0300 [thread overview]
Message-ID: <20200720042759.1482341-4-tudor.ambarus@microchip.com> (raw)
In-Reply-To: <20200720042759.1482341-1-tudor.ambarus@microchip.com>
From: Boris Brezillon <boris.brezillon@collabora.com>
Use the nand_{write,read}_data_op() helpers instead of calling the
atmel_nand_{read,write}_buf() functions directly. This will ease the
transition to exec_op().
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
drivers/mtd/nand/raw/atmel/nand-controller.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c
index f738c4bfbd77..a3f901e64bfb 100644
--- a/drivers/mtd/nand/raw/atmel/nand-controller.c
+++ b/drivers/mtd/nand/raw/atmel/nand-controller.c
@@ -833,7 +833,7 @@ static int atmel_nand_pmecc_write_pg(struct nand_chip *chip, const u8 *buf,
if (ret)
return ret;
- atmel_nand_write_buf(chip, buf, mtd->writesize);
+ nand_write_data_op(chip, buf, mtd->writesize, false);
ret = atmel_nand_pmecc_generate_eccbytes(chip, raw);
if (ret) {
@@ -843,7 +843,7 @@ static int atmel_nand_pmecc_write_pg(struct nand_chip *chip, const u8 *buf,
atmel_nand_pmecc_disable(chip, raw);
- atmel_nand_write_buf(chip, chip->oob_poi, mtd->oobsize);
+ nand_write_data_op(chip, chip->oob_poi, mtd->oobsize, false);
return nand_prog_page_end_op(chip);
}
@@ -873,8 +873,8 @@ static int atmel_nand_pmecc_read_pg(struct nand_chip *chip, u8 *buf,
if (ret)
return ret;
- atmel_nand_read_buf(chip, buf, mtd->writesize);
- atmel_nand_read_buf(chip, chip->oob_poi, mtd->oobsize);
+ nand_read_data_op(chip, buf, mtd->writesize, false, false);
+ nand_read_data_op(chip, chip->oob_poi, mtd->oobsize, false, false);
ret = atmel_nand_pmecc_correct_data(chip, buf, raw);
@@ -934,7 +934,7 @@ static int atmel_hsmc_nand_pmecc_write_pg(struct nand_chip *chip,
if (ret)
return ret;
- atmel_nand_write_buf(chip, chip->oob_poi, mtd->oobsize);
+ nand_write_data_op(chip, chip->oob_poi, mtd->oobsize, false);
nc->op.cmds[0] = NAND_CMD_PAGEPROG;
nc->op.ncmds = 1;
--
2.25.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2020-07-20 4:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-20 4:27 [PATCH v4 0/6] mtd: rawnand: atmel: Convert the driver to exec_op() Tudor Ambarus
2020-07-20 4:27 ` [PATCH v4 1/6] mtd: rawnand: atmel: Enable the NFC controller at probe time Tudor Ambarus
2020-07-20 4:27 ` [PATCH v4 2/6] mtd: rawnand: atmel: Drop redundant nand_read_page_op() Tudor Ambarus
2020-07-20 4:27 ` Tudor Ambarus [this message]
2020-07-20 4:27 ` [PATCH v4 4/6] mtd: rawnand: atmel: Use nand_prog_page_end_op() Tudor Ambarus
2020-07-20 4:27 ` [PATCH v4 5/6] mtd: rawnand: atmel: Convert the driver to exec_op() Tudor Ambarus
2020-07-20 11:52 ` Boris Brezillon
2020-07-20 4:27 ` [PATCH v4 6/6] mtd: rawnand: atmel: Get rid of the legacy interface implementation Tudor Ambarus
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=20200720042759.1482341-4-tudor.ambarus@microchip.com \
--to=tudor.ambarus@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=boris.brezillon@collabora.com \
--cc=linux-mtd@lists.infradead.org \
--cc=ludovic.desroches@microchip.com \
--cc=miquel.raynal@bootlin.com \
--cc=nicolas.ferre@microchip.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).