mtd: rawnand: cs553x: Convert to exec_op()
Subsystems (2)
cover mtd: rawnand: cs553x: Convert to exec_op()
Hello,
A bit of context to explain the motivation behind those conversions I've been sending for the last couple of weeks. The raw NAND subsystem carries a lot of history which makes any rework not only painful, but also subject to regressions which we only detect when someone dares to update its kernel on one of those ancient HW. While carrying drivers for old HW is not a problem per se, carrying ancient and unmaintained drivers that are not converted to new APIs is a maintenance burden, hence this massive conversion attempt I'm conducting here.
So here is a series converting the CS553X NAND controller driver to exec_op(), plus a bunch of minor improvements done along the way. I hope I'll find someone to test those changes, but if there's no one still using NAND on GEODE or no interest in keeping it supported in recent kernel versions, we should definitely consider removing the driver instead.
Regards,
Boris
Boris Brezillon (4):
mtd: rawnand: cs553x: Declare controllers instead of NAND chips
mtd: rawnand: cs553x: Stop using chip->legacy.IO_ADDR_{R,W}
mtd: rawnand: cs553x: Implement exec_op()
mtd: rawnand: cs553x: Get rid of the legacy interface implementation
drivers/mtd/nand/raw/cs553x_nand.c | 194 ++++++++++++++++++++--------- 1 file changed, 134 insertions(+), 60 deletions(-)
Signature · 6 lines
2.25.3 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH 1/4 mtd: rawnand: cs553x: Declare controllers instead of NAND chips
The CS553x companion chip embeds 4 NAND controllers. Declare them as NAND controllers instead of NAND chips. That's done in preparation of the transition to exec_op().
--- drivers/mtd/nand/raw/cs553x_nand.c | 33 ++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 11 deletions(-)
drivers/mtd/nand/raw/cs553x_nand.c +22 -11
@@ -89,6 +89,11 @@#define CS_NAND_ECC_CLRECC (1<<1)#define CS_NAND_ECC_ENECC (1<<0) +struct cs553x_nand_controller { +struct nand_controller base; +struct nand_chip chip; +}; +static void cs553x_read_buf (struct nand_chip *this,u_char *buf,int len) {while (unlikely (len >0x800 )) {
@@ -166,10 +171,11 @@ static int cs_calculate_ecc(struct nand_chip *this, const u_char *dat,return 0 ; } -static struct mtd_info *cs553x_mtd[4 ]; +static struct cs553x_nand_controller *controllers[4 ];static int __init cs553x_init_one (int cs,int mmio,unsigned long adr) { +struct cs553x_nand_controller *controller;int err =0 ;struct nand_chip *this;struct mtd_info *new_mtd;
@@ -183,12 +189,15 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr) }/* Allocate memory for MTD device structure and private data */ - this =kzalloc (sizeof (struct nand_chip ),GFP_KERNEL ); -if (!this) { + controller =kzalloc (sizeof (*controller),GFP_KERNEL ); +if (!controller) { err = -ENOMEM ; goto out; } + this = &controller->chip; +nand_controller_init (&controller->base); + this->controller = &controller->base; new_mtd =nand_to_mtd (this);/* Link the private data with the MTD structure */
@@ -232,7 +241,7 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr)if (err) goto out_free; - cs553x_mtd[cs] = new_mtd; + controllers[cs] = controller; goto out; out_free:
@@ -240,7 +249,7 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr) out_ior:iounmap (this->legacy.IO_ADDR_R); out_mtd: -kfree (this); +kfree (controller); out:return err; }
@@ -295,9 +304,10 @@ static int __init cs553x_init(void)/* Register all devices together here. This means we can easily hack it to do mtdconcat etc. if we want to. */ for (i =0 ; i <NR_CS553X_CONTROLLERS ; i++) { -if (cs553x_mtd[i]) { +if (controllers[i]) {/* If any devices registered, return success. Else the last error. */ -mtd_device_register (cs553x_mtd[i],NULL ,0 ); +mtd_device_register (nand_to_mtd (&controllers[i]->chip), +NULL ,0 ); err =0 ; } }
@@ -312,9 +322,10 @@ static void __exit cs553x_cleanup(void)int i;for (i =0 ; i <NR_CS553X_CONTROLLERS ; i++) { -struct mtd_info *mtd = cs553x_mtd[i]; -struct nand_chip *this;void __iomem *mmio_base; +struct cs553x_nand_controller *controller = controllers[i]; +struct nand_chip *this = &controller->chip; +struct mtd_info *mtd =nand_to_mtd (this);if (!mtd)continue ;
@@ -325,13 +336,13 @@ static void __exit cs553x_cleanup(void)/* Release resources, unregister device */ nand_release (this);kfree (mtd->name); - cs553x_mtd[i] =NULL ; + controllers[i] =NULL ;/* unmap physical address */ iounmap (mmio_base);/* Free the MTD device structure */ -kfree (this); +kfree (controller); } }
Signature · 6 lines
2.25.3 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 1/4] mtd: rawnand: cs553x: Declare controllers instead of NAND chips
Hi Boris,
Boris Brezillon <[email protected]> wrote on Fri, 1 May 2020 11:06:47 +0200:
Quoted 6 lines
The CS553x companion chip embeds 4 NAND controllers. Declare them as NAND controllers instead of NAND chips. That's done in preparation of the transition to
exec_op().Signed-off-by Boris Brezillon <[email protected]>---
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 1/4] mtd: rawnand: cs553x: Declare controllers instead of NAND chips
In reply to Boris BrezillonQuoted 6 lines · Boris Brezillon
The CS553x companion chip embeds 4 NAND controllers. Declare them as NAND controllers instead of NAND chips. That's done in preparation of the transition to
exec_op().Signed-off-by Boris Brezillon <[email protected]>Reviewed-by Miquel Raynal <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH 2/4 mtd: rawnand: cs553x: Stop using chip->legacy.IO_ADDR_{R, W}
In reply to Boris BrezillonNow that we have our own controller struct we can keep the MMIO pointer in there and use instead of using the chip->legacy.IO_ADDR_{R,W} fields.
--- drivers/mtd/nand/raw/cs553x_nand.c | 57 ++++++++++++++++++------------ 1 file changed, 34 insertions(+), 23 deletions(-)
drivers/mtd/nand/raw/cs553x_nand.c +34 -23
@@ -92,51 +92,66 @@struct cs553x_nand_controller {struct nand_controller base;struct nand_chip chip; +void __iomem *mmio; }; +static struct cs553x_nand_controller * +to_cs553x (struct nand_controller *controller) +{ + return container_of(controller, struct cs553x_nand_controller, base); +} +static void cs553x_read_buf (struct nand_chip *this,u_char *buf,int len) { +struct cs553x_nand_controller *cs553x =to_cs553x (this->controller); +while (unlikely (len >0x800 )) { -memcpy_fromio (buf, this->legacy.IO_ADDR_R,0x800 ); +memcpy_fromio (buf, cs553x->mmio,0x800 ); buf +=0x800 ; len -=0x800 ; } -memcpy_fromio (buf, this->legacy.IO_ADDR_R, len); +memcpy_fromio (buf, cs553x->mmio, len); }static void cs553x_write_buf (struct nand_chip *this,const u_char *buf,int len) { +struct cs553x_nand_controller *cs553x =to_cs553x (this->controller); +while (unlikely (len >0x800 )) { -memcpy_toio (this->legacy.IO_ADDR_R, buf,0x800 ); +memcpy_toio (cs553x->mmio, buf,0x800 ); buf +=0x800 ; len -=0x800 ; } -memcpy_toio (this->legacy.IO_ADDR_R, buf, len); +memcpy_toio (cs553x->mmio, buf, len); }static unsigned char cs553x_read_byte (struct nand_chip *this) { -return readb (this->legacy.IO_ADDR_R); +struct cs553x_nand_controller *cs553x =to_cs553x (this->controller); + +return readb (cs553x->mmio); }static void cs553x_write_byte (struct nand_chip *this,u_char byte) { +struct cs553x_nand_controller *cs553x =to_cs553x (this->controller);int i =100000 ; -while (i &&readb (this->legacy.IO_ADDR_R +MM_NAND_STS ) &CS_NAND_CTLR_BUSY ) { +while (i &&readb (cs553x->mmio +MM_NAND_STS ) &CS_NAND_CTLR_BUSY ) {udelay (1 ); i--; } -writeb (byte, this->legacy.IO_ADDR_W +0x801 ); +writeb (byte, cs553x->mmio +0x801 ); }static void cs553x_hwcontrol (struct nand_chip *this,int cmd,unsigned int ctrl) { -void __iomem *mmio_base = this->legacy.IO_ADDR_R; +struct cs553x_nand_controller *cs553x =to_cs553x (this->controller); +if (ctrl &NAND_CTRL_CHANGE ) {unsigned char ctl = (ctrl & ~NAND_CTRL_CHANGE ) ^0x01 ; -writeb (ctl, mmio_base +MM_NAND_CTL ); +writeb (ctl, cs553x->mmio +MM_NAND_CTL ); }if (cmd !=NAND_CMD_NONE )cs553x_write_byte (this, cmd);
@@ -144,26 +159,26 @@ static void cs553x_hwcontrol(struct nand_chip *this, int cmd,static int cs553x_device_ready (struct nand_chip *this) { -void __iomem *mmio_base = this->legacy.IO_ADDR_R; -unsigned char foo =readb (mmio_base +MM_NAND_STS ); +struct cs553x_nand_controller *cs553x =to_cs553x (this->controller); +unsigned char foo =readb (cs553x->mmio +MM_NAND_STS );return (foo &CS_NAND_STS_FLASH_RDY ) && !(foo &CS_NAND_CTLR_BUSY ); }static void cs_enable_hwecc (struct nand_chip *this,int mode) { -void __iomem *mmio_base = this->legacy.IO_ADDR_R; +struct cs553x_nand_controller *cs553x =to_cs553x (this->controller); -writeb (0x07 , mmio_base +MM_NAND_ECC_CTL ); +writeb (0x07 , cs553x->mmio +MM_NAND_ECC_CTL ); }static int cs_calculate_ecc (struct nand_chip *this,const u_char *dat,u_char *ecc_code) { +struct cs553x_nand_controller *cs553x =to_cs553x (this->controller);uint32_t ecc; -void __iomem *mmio_base = this->legacy.IO_ADDR_R; - ecc =readl (mmio_base +MM_NAND_STS ); + ecc =readl (cs553x->mmio +MM_NAND_STS ); ecc_code[1 ] = ecc >>8 ; ecc_code[0 ] = ecc >>16 ;
@@ -204,8 +219,8 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr) new_mtd->owner =THIS_MODULE ;/* map physical address */ - this->legacy.IO_ADDR_R = this->legacy.IO_ADDR_W =ioremap (adr,4096 ); -if (!this->legacy.IO_ADDR_R) { + controller->mmio =ioremap (adr,4096 ); +if (!controller->mmio) {pr_warn ("ioremap cs553x NAND @0x%08lx failed\n" , adr); err = -EIO ; goto out_mtd;
@@ -247,7 +262,7 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr) out_free:kfree (new_mtd->name); out_ior: -iounmap (this->legacy.IO_ADDR_R); +iounmap (controller->mmio); out_mtd:kfree (controller); out:
@@ -322,7 +337,6 @@ static void __exit cs553x_cleanup(void)int i;for (i =0 ; i <NR_CS553X_CONTROLLERS ; i++) { -void __iomem *mmio_base;struct cs553x_nand_controller *controller = controllers[i];struct nand_chip *this = &controller->chip;struct mtd_info *mtd =nand_to_mtd (this);
@@ -330,16 +344,13 @@ static void __exit cs553x_cleanup(void)if (!mtd)continue ; - this =mtd_to_nand (mtd); - mmio_base = this->legacy.IO_ADDR_R; -/* Release resources, unregister device */ nand_release (this);kfree (mtd->name); controllers[i] =NULL ;/* unmap physical address */ -iounmap (mmio_base); +iounmap (controller->mmio);/* Free the MTD device structure */ kfree (controller);
Signature · 6 lines
2.25.3 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 2/4] mtd: rawnand: cs553x: Stop using chip->legacy.IO_ADDR_{R,W}
Hi Boris,
Boris Brezillon <[email protected]> wrote on Fri, 1 May 2020 11:06:48 +0200:
Quoted 8 lines
Now that we have our own controller struct we can keep the MMIO pointer in there and use instead of using the chip->legacy.IO_ADDR_{R,W} fields.
Signed-off-by Boris Brezillon <[email protected]>--- drivers/mtd/nand/raw/cs553x_nand.c | 57 ++++++++++++++++++------------ 1 file changed, 34 insertions(+), 23 deletions(-)
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Miquel Raynal
maintainerRe: [PATCH 2/4] mtd: rawnand: cs553x: Stop using chip->legacy.IO_ADDR_{R,W}
In reply to Boris BrezillonBoris Brezillon <[email protected]> wrote on Fri, 1 May 2020 11:06:48 +0200:
Quoted 2 lines
Now that we have our own controller struct we can keep the MMIO pointer in there and use instead of using the chip->legacy.IO_ADDR_{R,W} fields.
it
(don't send a v2 just for this)
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 2/4] mtd: rawnand: cs553x: Stop using chip->legacy.IO_ADDR_{R, W}
In reply to Boris BrezillonQuoted 5 lines · Boris Brezillon
Now that we have our own controller struct we can keep the MMIO pointer in there and use instead of using the chip->legacy.IO_ADDR_{R,W} fields.
Signed-off-by Boris Brezillon <[email protected]>Reviewed-by Miquel Raynal <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH 3/4 mtd: rawnand: cs553x: Implement exec_op()
In reply to Boris BrezillonSo we can later get rid of the legacy hooks.
--- drivers/mtd/nand/raw/cs553x_nand.c | 126 ++++++++++++++++++++++++++++- 1 file changed, 125 insertions(+), 1 deletion(-)
drivers/mtd/nand/raw/cs553x_nand.c +125 -1
@@ -21,9 +21,9 @@#include <linux/mtd/rawnand.h> #include <linux/mtd/nand_ecc.h> #include <linux/mtd/partitions.h> +#include <linux/iopoll.h> #include <asm/msr.h> -#include <asm/io.h> #define NR_CS553X_CONTROLLERS 4
@@ -165,6 +165,125 @@ static int cs553x_device_ready(struct nand_chip *this)return (foo &CS_NAND_STS_FLASH_RDY ) && !(foo &CS_NAND_CTLR_BUSY ); } +static int cs553x_write_ctrl_byte (struct cs553x_nand_controller *cs553x, +u32 ctl,u8 data) +{ +u8 status; +int ret; + +writeb (ctl, cs553x->mmio +MM_NAND_CTL ); +writeb (data, cs553x->mmio +MM_NAND_IO ); + ret =readb_poll_timeout_atomic (cs553x->mmio +MM_NAND_STS , status, + !(status &CS_NAND_CTLR_BUSY ),1 , +100000 ); +if (ret) +return ret; + +return 0 ; +} + +static void cs553x_data_in (struct cs553x_nand_controller *cs553x,void *buf, +unsigned int len) +{ +writeb (0 , cs553x->mmio +MM_NAND_CTL ); +while (unlikely (len >0x800 )) { +memcpy_fromio (buf, cs553x->mmio,0x800 ); + buf +=0x800 ; + len -=0x800 ; + } +memcpy_fromio (buf, cs553x->mmio, len); +} + +static void cs553x_data_out (struct cs553x_nand_controller *cs553x, +const void *buf,unsigned int len) +{ +writeb (0 , cs553x->mmio +MM_NAND_CTL ); +while (unlikely (len >0x800 )) { +memcpy_toio (cs553x->mmio, buf,0x800 ); + buf +=0x800 ; + len -=0x800 ; + } +memcpy_toio (cs553x->mmio, buf, len); +} + +static int cs553x_wait_ready (struct cs553x_nand_controller *cs553x, +unsigned int timeout_ms) +{ +u8 mask =CS_NAND_CTLR_BUSY |CS_NAND_STS_FLASH_RDY ; +u8 status; + +return readb_poll_timeout (cs553x->mmio +MM_NAND_STS , status, + (status & mask) ==CS_NAND_STS_FLASH_RDY ,100 , + timeout_ms *1000 ); +} + +static int cs553x_exec_instr (struct cs553x_nand_controller *cs553x, +const struct nand_op_instr *instr) +{ +unsigned int i; +int ret =0 ; + +switch (instr->type) { +case NAND_OP_CMD_INSTR : + ret =cs553x_write_ctrl_byte (cs553x,CS_NAND_CTL_CLE , + instr->ctx.cmd.opcode); +break ; + +case NAND_OP_ADDR_INSTR : +for (i =0 ; i < instr->ctx.addr.naddrs; i++) { + ret =cs553x_write_ctrl_byte (cs553x,CS_NAND_CTL_ALE , + instr->ctx.addr.addrs[i]); +if (ret) +break ; + } +break ; + +case NAND_OP_DATA_IN_INSTR : +cs553x_data_in (cs553x, instr->ctx.data.buf.in, + instr->ctx.data.len); +break ; + +case NAND_OP_DATA_OUT_INSTR : +cs553x_data_out (cs553x, instr->ctx.data.buf.out, + instr->ctx.data.len); +break ; + +case NAND_OP_WAITRDY_INSTR : + ret =cs553x_wait_ready (cs553x, instr->ctx.waitrdy.timeout_ms); +break ; + } + +if (instr->delay_ns) +ndelay (instr->delay_ns); + +return ret; +} + +static int cs553x_exec_op (struct nand_chip *this, +const struct nand_operation *op, +bool check_only) +{ +struct cs553x_nand_controller *cs553x =to_cs553x (this->controller); +unsigned int i; +int ret; + +if (check_only) +return true; + +/* De-assert the CE pin */ +writeb (0 , cs553x->mmio +MM_NAND_CTL ); +for (i =0 ; i < op->ninstrs; i++) { + ret =cs553x_exec_instr (cs553x, &op->instrs[i]); +if (ret) +break ; + } + +/* Re-assert the CE pin. */ +writeb (CS_NAND_CTL_CE , cs553x->mmio +MM_NAND_CTL ); + +return ret; +} +static void cs_enable_hwecc (struct nand_chip *this,int mode) {struct cs553x_nand_controller *cs553x =to_cs553x (this->controller);
@@ -188,6 +307,10 @@ static int cs_calculate_ecc(struct nand_chip *this, const u_char *dat,static struct cs553x_nand_controller *controllers[4 ]; +static const struct nand_controller_ops cs553x_nand_controller_ops = { + .exec_op = cs553x_exec_op, +}; +static int __init cs553x_init_one (int cs,int mmio,unsigned long adr) {struct cs553x_nand_controller *controller;
@@ -212,6 +335,7 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr) this = &controller->chip;nand_controller_init (&controller->base); + controller->base.ops = &cs553x_nand_controller_ops; this->controller = &controller->base; new_mtd =nand_to_mtd (this);
Signature · 6 lines
2.25.3 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 3/4] mtd: rawnand: cs553x: Implement exec_op()
Boris Brezillon <[email protected]> wrote on Fri, 1 May 2020 11:06:49 +0200:
Quoted 7 lines
So we can later get rid of the legacy hooks.
Signed-off-by Boris Brezillon <[email protected]>--- drivers/mtd/nand/raw/cs553x_nand.c | 126 ++++++++++++++++++++++++++++- 1 file changed, 125 insertions(+), 1 deletion(-)
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 3/4] mtd: rawnand: cs553x: Implement exec_op()
In reply to Boris BrezillonQuoted 4 lines · Boris Brezillon
So we can later get rid of the legacy hooks.
Signed-off-by Boris Brezillon <[email protected]>Reviewed-by Miquel Raynal <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH 4/4 mtd: rawnand: cs553x: Get rid of the legacy interface implementation
In reply to Boris BrezillonNow that exec_op() is implemented we no longer need to implement the legacy hooks.
--- drivers/mtd/nand/raw/cs553x_nand.c | 72 ------------------------------ 1 file changed, 72 deletions(-)
drivers/mtd/nand/raw/cs553x_nand.c +0 -72
@@ -101,70 +101,6 @@ to_cs553x(struct nand_controller *controller) return container_of(controller, struct cs553x_nand_controller, base); } -static void cs553x_read_buf (struct nand_chip *this,u_char *buf,int len) -{ -struct cs553x_nand_controller *cs553x =to_cs553x (this->controller); - -while (unlikely (len >0x800 )) { -memcpy_fromio (buf, cs553x->mmio,0x800 ); - buf +=0x800 ; - len -=0x800 ; - } -memcpy_fromio (buf, cs553x->mmio, len); -} - -static void cs553x_write_buf (struct nand_chip *this,const u_char *buf,int len) -{ -struct cs553x_nand_controller *cs553x =to_cs553x (this->controller); - -while (unlikely (len >0x800 )) { -memcpy_toio (cs553x->mmio, buf,0x800 ); - buf +=0x800 ; - len -=0x800 ; - } -memcpy_toio (cs553x->mmio, buf, len); -} - -static unsigned char cs553x_read_byte (struct nand_chip *this) -{ -struct cs553x_nand_controller *cs553x =to_cs553x (this->controller); - -return readb (cs553x->mmio); -} - -static void cs553x_write_byte (struct nand_chip *this,u_char byte) -{ -struct cs553x_nand_controller *cs553x =to_cs553x (this->controller); -int i =100000 ; - -while (i &&readb (cs553x->mmio +MM_NAND_STS ) &CS_NAND_CTLR_BUSY ) { -udelay (1 ); - i--; - } -writeb (byte, cs553x->mmio +0x801 ); -} - -static void cs553x_hwcontrol (struct nand_chip *this,int cmd, -unsigned int ctrl) -{ -struct cs553x_nand_controller *cs553x =to_cs553x (this->controller); - -if (ctrl &NAND_CTRL_CHANGE ) { -unsigned char ctl = (ctrl & ~NAND_CTRL_CHANGE ) ^0x01 ; -writeb (ctl, cs553x->mmio +MM_NAND_CTL ); - } -if (cmd !=NAND_CMD_NONE ) -cs553x_write_byte (this, cmd); -} - -static int cs553x_device_ready (struct nand_chip *this) -{ -struct cs553x_nand_controller *cs553x =to_cs553x (this->controller); -unsigned char foo =readb (cs553x->mmio +MM_NAND_STS ); - -return (foo &CS_NAND_STS_FLASH_RDY ) && !(foo &CS_NAND_CTLR_BUSY ); -} -static int cs553x_write_ctrl_byte (struct cs553x_nand_controller *cs553x,u32 ctl,u8 data) {
@@ -350,14 +286,6 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr) goto out_mtd; } - this->legacy.cmd_ctrl = cs553x_hwcontrol; - this->legacy.dev_ready = cs553x_device_ready; - this->legacy.read_byte = cs553x_read_byte; - this->legacy.read_buf = cs553x_read_buf; - this->legacy.write_buf = cs553x_write_buf; - - this->legacy.chip_delay =0 ; - this->ecc.mode =NAND_ECC_HW ; this->ecc.size =256 ; this->ecc.bytes =3 ;
Signature · 6 lines
2.25.3 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 4/4] mtd: rawnand: cs553x: Get rid of the legacy interface implementation
Boris Brezillon <[email protected]> wrote on Fri, 1 May 2020 11:06:50 +0200:
Quoted 5 lines
Now that
exec_op()is implemented we no longer need to implement the legacy hooks.Signed-off-by Boris Brezillon <[email protected]>---
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 4/4] mtd: rawnand: cs553x: Get rid of the legacy interface implementation
In reply to Boris BrezillonQuoted 5 lines · Boris Brezillon
Now that
exec_op()is implemented we no longer need to implement the legacy hooks.Signed-off-by Boris Brezillon <[email protected]>Reviewed-by Miquel Raynal <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/