Message ID | 20200603134922.1352340-8-boris.brezillon@collabora.com |
---|---|
State | Accepted |
Headers | show |
Series | mtd: rawnand: fsl_upm: Convert to exec_op() (and more) | expand |
Boris Brezillon <boris.brezillon@collabora.com> wrote on Wed, 3 Jun 2020 15:49:19 +0200: > Explicitly inherit from nand_controller instead of relying on the > nand_chip.legacy.dummy_controller field. > > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> > --- > drivers/mtd/nand/raw/fsl_upm.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c > index 977b7aad419b..9a63e36825d8 100644 > --- a/drivers/mtd/nand/raw/fsl_upm.c > +++ b/drivers/mtd/nand/raw/fsl_upm.c > @@ -24,6 +24,7 @@ > #define FSL_UPM_WAIT_WRITE_BUFFER 0x4 > > struct fsl_upm_nand { > + struct nand_controller base; > struct device *dev; > struct nand_chip chip; > int last_ctrl; > @@ -167,6 +168,7 @@ static int fun_chip_init(struct fsl_upm_nand *fun, > if (!fun->rnb_gpio[0]) > fun->chip.legacy.dev_ready = fun_chip_ready; > > + fun->chip.controller = &fun->base; > mtd->dev.parent = fun->dev; > > flash_np = of_get_next_child(upm_np, NULL); > @@ -268,6 +270,7 @@ static int fun_probe(struct platform_device *ofdev) > fun->wait_flags = FSL_UPM_WAIT_RUN_PATTERN | > FSL_UPM_WAIT_WRITE_BYTE; > > + nand_controller_init(&fun->base); > fun->dev = &ofdev->dev; > fun->last_ctrl = NAND_CLE; > Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
On Wed, 2020-06-03 at 13:49:19 UTC, Boris Brezillon wrote: > Explicitly inherit from nand_controller instead of relying on the > nand_chip.legacy.dummy_controller field. > > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> > Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks. Miquel
diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c index 977b7aad419b..9a63e36825d8 100644 --- a/drivers/mtd/nand/raw/fsl_upm.c +++ b/drivers/mtd/nand/raw/fsl_upm.c @@ -24,6 +24,7 @@ #define FSL_UPM_WAIT_WRITE_BUFFER 0x4 struct fsl_upm_nand { + struct nand_controller base; struct device *dev; struct nand_chip chip; int last_ctrl; @@ -167,6 +168,7 @@ static int fun_chip_init(struct fsl_upm_nand *fun, if (!fun->rnb_gpio[0]) fun->chip.legacy.dev_ready = fun_chip_ready; + fun->chip.controller = &fun->base; mtd->dev.parent = fun->dev; flash_np = of_get_next_child(upm_np, NULL); @@ -268,6 +270,7 @@ static int fun_probe(struct platform_device *ofdev) fun->wait_flags = FSL_UPM_WAIT_RUN_PATTERN | FSL_UPM_WAIT_WRITE_BYTE; + nand_controller_init(&fun->base); fun->dev = &ofdev->dev; fun->last_ctrl = NAND_CLE;
Explicitly inherit from nand_controller instead of relying on the nand_chip.legacy.dummy_controller field. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> --- drivers/mtd/nand/raw/fsl_upm.c | 3 +++ 1 file changed, 3 insertions(+)