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 1/3] mtd: rawnand: gpio: Inherit from nand_controller
Date: Wed, 3 Jun 2020 17:07:44 +0200 [thread overview]
Message-ID: <20200603150746.1423257-2-boris.brezillon@collabora.com> (raw)
In-Reply-To: <20200603150746.1423257-1-boris.brezillon@collabora.com>
Inherit from nand_controller so we don't rely on the
nand_chip.legacy.dummy_controller field.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
drivers/mtd/nand/raw/gpio.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/mtd/nand/raw/gpio.c b/drivers/mtd/nand/raw/gpio.c
index 938077e5c6a9..33828fb20a13 100644
--- a/drivers/mtd/nand/raw/gpio.c
+++ b/drivers/mtd/nand/raw/gpio.c
@@ -27,6 +27,7 @@
#include <linux/of_address.h>
struct gpiomtd {
+ struct nand_controller base;
void __iomem *io_sync;
struct nand_chip nand_chip;
struct gpio_nand_platdata plat;
@@ -273,6 +274,7 @@ static int gpio_nand_probe(struct platform_device *pdev)
if (gpiomtd->rdy)
chip->legacy.dev_ready = gpio_nand_devready;
+ nand_controller_init(&gpiomtd->base);
nand_set_flash_node(chip, pdev->dev.of_node);
chip->legacy.IO_ADDR_W = chip->legacy.IO_ADDR_R;
chip->ecc.mode = NAND_ECC_SOFT;
@@ -280,6 +282,7 @@ static int gpio_nand_probe(struct platform_device *pdev)
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);
mtd->dev.parent = dev;
--
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 ` Boris Brezillon [this message]
2020-06-15 9:00 ` [PATCH 1/3] mtd: rawnand: gpio: Inherit from nand_controller 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 ` [PATCH 3/3] mtd: rawnand: gpio: Get rid of the legacy interface implementation Boris Brezillon
2020-06-15 9:00 ` 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-2-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