From: Boris Brezillon <boris.brezillon@collabora.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>,
linux-mtd@lists.infradead.org, Ben Dooks <ben-linux@fluff.org>
Cc: linux-mips@linux-mips.org, Vignesh Raghavendra <vigneshr@ti.com>,
Tudor Ambarus <tudor.ambarus@microchip.com>,
Richard Weinberger <richard@nod.at>,
Ralf Baechle <ralf@linux-mips.org>,
Boris Brezillon <boris.brezillon@collabora.com>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Jamie Iles <jamie@jamieiles.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Daniel Mack <daniel@zonque.org>
Subject: [PATCH 3/3] mtd: rawnand: gpio: Get rid of the legacy interface implementation
Date: Wed, 3 Jun 2020 17:07:46 +0200 [thread overview]
Message-ID: <20200603150746.1423257-4-boris.brezillon@collabora.com> (raw)
In-Reply-To: <20200603150746.1423257-1-boris.brezillon@collabora.com>
Now that exec_op() is implemented, we can get rid of the legacy interface
implementation.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
drivers/mtd/nand/raw/gpio.c | 35 -----------------------------------
1 file changed, 35 deletions(-)
diff --git a/drivers/mtd/nand/raw/gpio.c b/drivers/mtd/nand/raw/gpio.c
index 115998011192..3bd847ccc3f3 100644
--- a/drivers/mtd/nand/raw/gpio.c
+++ b/drivers/mtd/nand/raw/gpio.c
@@ -72,34 +72,6 @@ static void gpio_nand_dosync(struct gpiomtd *gpiomtd)
static inline void gpio_nand_dosync(struct gpiomtd *gpiomtd) {}
#endif
-static void gpio_nand_cmd_ctrl(struct nand_chip *chip, int cmd,
- unsigned int ctrl)
-{
- struct gpiomtd *gpiomtd = gpio_nand_getpriv(nand_to_mtd(chip));
-
- gpio_nand_dosync(gpiomtd);
-
- if (ctrl & NAND_CTRL_CHANGE) {
- if (gpiomtd->nce)
- gpiod_set_value(gpiomtd->nce, !(ctrl & NAND_NCE));
- gpiod_set_value(gpiomtd->cle, !!(ctrl & NAND_CLE));
- gpiod_set_value(gpiomtd->ale, !!(ctrl & NAND_ALE));
- gpio_nand_dosync(gpiomtd);
- }
- if (cmd == NAND_CMD_NONE)
- return;
-
- writeb(cmd, gpiomtd->nand_chip.legacy.IO_ADDR_W);
- gpio_nand_dosync(gpiomtd);
-}
-
-static int gpio_nand_devready(struct nand_chip *chip)
-{
- struct gpiomtd *gpiomtd = gpio_nand_getpriv(nand_to_mtd(chip));
-
- return gpiod_get_value(gpiomtd->rdy);
-}
-
static int gpio_nand_exec_instr(struct nand_chip *chip,
const struct nand_op_instr *instr)
{
@@ -365,21 +337,14 @@ static int gpio_nand_probe(struct platform_device *pdev)
ret = PTR_ERR(gpiomtd->rdy);
goto out_ce;
}
- /* Using RDY pin */
- if (gpiomtd->rdy)
- chip->legacy.dev_ready = gpio_nand_devready;
nand_controller_init(&gpiomtd->base);
gpiomtd->base.ops = &gpio_nand_ops;
nand_set_flash_node(chip, pdev->dev.of_node);
- chip->legacy.IO_ADDR_R = gpiomtd->io;
- chip->legacy.IO_ADDR_W = chip->legacy.IO_ADDR_R;
chip->ecc.mode = NAND_ECC_SOFT;
chip->ecc.algo = NAND_ECC_HAMMING;
chip->options = gpiomtd->plat.options;
- chip->legacy.chip_delay = gpiomtd->plat.chip_delay;
- chip->legacy.cmd_ctrl = gpio_nand_cmd_ctrl;
chip->controller = &gpiomtd->base;
mtd = nand_to_mtd(chip);
--
2.25.4
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2020-06-03 15:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-03 15:07 [PATCH 0/3] mtd: rawnand: gpio: Convert to exec_op() Boris Brezillon
2020-06-03 15:07 ` [PATCH 1/3] mtd: rawnand: gpio: Inherit from nand_controller Boris Brezillon
2020-06-15 9:00 ` Miquel Raynal
2020-06-03 15:07 ` [PATCH 2/3] mtd: rawnand: gpio: Implement exec_op() Boris Brezillon
2020-06-15 9:00 ` Miquel Raynal
2020-06-03 15:07 ` Boris Brezillon [this message]
2020-06-15 9:00 ` [PATCH 3/3] mtd: rawnand: gpio: Get rid of the legacy interface implementation Miquel Raynal
2020-06-03 15:13 ` [PATCH 0/3] mtd: rawnand: gpio: Convert to exec_op() 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=20200603150746.1423257-4-boris.brezillon@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=ben-linux@fluff.org \
--cc=daniel@zonque.org \
--cc=haojian.zhuang@gmail.com \
--cc=jamie@jamieiles.com \
--cc=linux-mips@linux-mips.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=ralf@linux-mips.org \
--cc=richard@nod.at \
--cc=robert.jarzmik@free.fr \
--cc=tudor.ambarus@microchip.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