[PATCH v5 00/52] mtd: rework ECC layout definition

2016-03-30 Thread Boris Brezillon
ew bugs in some ->ecc()/->free() implementations Boris Brezillon (50): mtd: add mtd_ooblayout_xxx() helper functions mtd: use mtd_ooblayout_xxx() helpers where appropriate mtd: nand: core: use mtd_ooblayout_xxx() helpers where appropriate mtd: nand: atmel: use mtd_ooblayout_xxx() help

[PATCH v5 48/50] staging: mt29f_spinand: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Replace the nand_ecclayout definition by the equivalent mtd_ooblayout_ops definition. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/staging/mt29f_spinand/mt29f_spinand.c | 48 +-- 1 file changed, 30 insertions(+), 18 deletions(-)

[PATCH v5 46/50] mtd: nand: qcom: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> Tested-by: Archit Taneja <arch...@codeaurora.org> --- drivers/mtd/nand/qcom_

[PATCH v5 41/50] mtd: nand: s3c2410: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/s3c2410.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-)

[PATCH v5 42/50] mtd: nand: sh_flctl: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/sh_flctl.c | 87 ++--- 1 file changed, 67 insertions(

[PATCH v5 27/50] mtd: nand: denali: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/denali.c | 50 +-- 1 file changed, 35 insertions(

[PATCH v5 36/50] mtd: nand: jz4780: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> Tested-by: Harvey Hunt <harvey.h...@imgtec.com> --- drivers/mtd/nand/jz4780_nand.c | 19 +-- 1 fil

[PATCH v5 35/50] mtd: nand: hisi504: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/hisi504_nand.c | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-)

[PATCH v5 43/50] mtd: nand: sm_common: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/sm_common.c | 93 1 file changed, 77 insertions(

[PATCH v5 28/50] mtd: nand: diskonchip: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/diskonchip.c | 60 --- 1 file changed, 45 insertions(

[PATCH v5 45/50] mtd: nand: vf610: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/vf610_nfc.c | 34 -- 1 file changed, 4 insertions(+), 30 del

[PATCH v5 50/50] mtd: kill the nand_ecclayout struct

2016-03-30 Thread Boris Brezillon
Now that all MTD drivers have moved to the mtd_ooblayout_ops model we can safely remove the struct nand_ecclayout definition, and all the remaining places where it was still used. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/mtdchar.c

[PATCH v5 47/50] mtd: onenand: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Modify the onenand drivers to switch to this approach. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/onenand/onenand_base.c

[PATCH v5 03/50] mtd: nand: core: use mtd_ooblayout_xxx() helpers where appropriate

2016-03-30 Thread Boris Brezillon
The mtd_ooblayout_xxx() helper functions have been added to avoid direct accesses to the ecclayout field, and thus ease for future reworks. Use these helpers in all places where the oobfree[] and eccpos[] arrays where directly accessed. Signed-off-by: Boris Brezillon <boris.brezil...@f

[PATCH v5 14/50] mtd: onenand: use mtd_set_ecclayout() where appropriate

2016-03-30 Thread Boris Brezillon
Use the mtd_set_ecclayout() helper instead of directly assigning the mtd->ecclayout field. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/onenand/onenand_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mt

[PATCH v5 19/50] mtd: nand: bch: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Replace the nand_ecclayout definition by the equivalent mtd_ooblayout_ops definition. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/nand_bch.c | 33 +++-- 1 file changed, 11 insertions(+), 22 deletions(-) diff

[PATCH v5 34/50] mtd: nand: gpmi: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 52 ++ 1 file changed, 40 insertions(

[PATCH v5 38/50] mtd: nand: mxc: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/mxc_nand.c | 212 ++-- 1 file changed, 105 insertions(+

[PATCH v5 16/50] mtd: create an mtd_ooblayout_ops struct to ease ECC layout definition

2016-03-30 Thread Boris Brezillon
ted and should be replaced by the equivalent mtd_ooblayout_ops. In the meantime we provide a wrapper around the ->ecclayout field to ease migration to this new model. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/mtdchar.c | 4 +- drivers/mtd/mtdco

[PATCH v5 20/50] mtd: nand: sharpsl: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- arch/arm/mach-pxa/spitz.c | 55 - drivers/mtd/nand/sharpsl.c

[PATCH v5 25/50] mtd: nand: cafe: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/cafe_nand.c | 44 1 file changed, 32 insertions(

[PATCH v5 32/50] mtd: nand: fsmc: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/fsmc_nand.c | 298 --- 1 file changed, 82 insertions(+

[PATCH v5 24/50] mtd: nand: brcm: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/brcmnand/brcmnand.c | 258 +-- 1 file changed, 157 insertions(+

[PATCH v5 18/50] mtd: nand: implement the default mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Replace the default nand_ecclayout definitions for large and small page devices with the equivalent mtd_ooblayout_ops. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/nand_base.c | 148 --- include/linux/mtd/

[PATCH v5 21/50] mtd: nand: jz4740: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- arch/mips/include/asm/mach-jz4740/jz4740_nand.h | 2 +- arch/mips/jz4740/board-qi_lb60.c

[PATCH v5 17/50] mtd: docg3: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Replace the nand_ecclayout definition by the equivalent mtd_ooblayout_ops definition. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> Acked-by: Robert Jarzmik <robert.jarz...@free.fr> --- drivers/mtd/devices/docg3.c | 46 ++---

[PATCH v5 26/50] mtd: nand: davinci: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/davinci_nand.c | 118 +++- 1 file changed, 44 insertions(

[PATCH v5 13/50] mtd: nand: use mtd_set_ecclayout() where appropriate

2016-03-30 Thread Boris Brezillon
Use the mtd_set_ecclayout() helper instead of directly assigning the mtd->ecclayout field. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/nand_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/nand

[PATCH v5 22/50] mtd: nand: atmel: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/atmel_nand.c | 84 --- 1 file changed, 38 insertions(

[PATCH v5 23/50] mtd: nand: bf5xx: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/bf5xx_nand.c | 51 --- 1 file changed, 28 insertions(

[PATCH v5 04/50] mtd: nand: atmel: use mtd_ooblayout_xxx() helpers where appropriate

2016-03-30 Thread Boris Brezillon
The mtd_ooblayout_xxx() helper functions have been added to avoid direct accesses to the ecclayout field, and thus ease for future reworks. Use these helpers in all places where the oobfree[] and eccpos[] arrays where directly accessed. Signed-off-by: Boris Brezillon <boris.brezil...@f

[PATCH v5 05/50] mtd: nand: fsl_ifc: use mtd_ooblayout_xxx() helpers where appropriate

2016-03-30 Thread Boris Brezillon
The mtd_ooblayout_xxx() helper functions have been added to avoid direct accesses to the ecclayout field, and thus ease for future reworks. Use these helpers in all places where the oobfree[] and eccpos[] arrays where directly accessed. Signed-off-by: Boris Brezillon <boris.brezil...@f

[PATCH v5 02/50] mtd: use mtd_ooblayout_xxx() helpers where appropriate

2016-03-30 Thread Boris Brezillon
The mtd_ooblayout_xxx() helper functions have been added to avoid direct accesses to the ecclayout field, and thus ease for future reworks. Use these helpers in all places where the oobfree[] and eccpos[] arrays where directly accessed. Signed-off-by: Boris Brezillon <boris.brezil...@f

[PATCH v5 08/50] mtd: nand: omap2: use mtd_ooblayout_xxx() helpers where appropriate

2016-03-30 Thread Boris Brezillon
The mtd_ooblayout_xxx() helper functions have been added to avoid direct accesses to the ecclayout field, and thus ease for future reworks. Use these helpers in all places where the oobfree[] and eccpos[] arrays where directly accessed. Signed-off-by: Boris Brezillon <boris.brezil...@f

[PATCH v5 15/50] mtd: docg3: use mtd_set_ecclayout() where appropriate

2016-03-30 Thread Boris Brezillon
Use the mtd_set_ecclayout() helper instead of directly assigning the mtd->ecclayout field. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> Acked-by: Robert Jarzmik <robert.jarz...@free.fr> --- drivers/mtd/devices/docg3.c | 2 +- 1 file changed, 1 insertion

[PATCH v5 06/50] mtd: nand: gpmi: use mtd_ooblayout_xxx() helpers where appropriate

2016-03-30 Thread Boris Brezillon
The mtd_ooblayout_xxx() helper functions have been added to avoid direct accesses to the ecclayout field, and thus ease for future reworks. Use these helpers in all places where the oobfree[] and eccpos[] arrays where directly accessed. Signed-off-by: Boris Brezillon <boris.brezil...@f

[PATCH v5 12/50] mtd: use mtd_set_ecclayout() where appropriate

2016-03-30 Thread Boris Brezillon
Use the mtd_set_ecclayout() helper instead of directly assigning the mtd->ecclayout field. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/mtdconcat.c | 2 +- drivers/mtd/mtdpart.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) d

[PATCH v5 10/50] mtd: onenand: use mtd_ooblayout_xxx() helpers where appropriate

2016-03-30 Thread Boris Brezillon
The mtd_ooblayout_xxx() helper functions have been added to avoid direct accesses to the ecclayout field, and thus ease for future reworks. Use these helpers in all places where the oobfree[] and eccpos[] arrays where directly accessed. Signed-off-by: Boris Brezillon <boris.brezil...@f

[PATCH v5 11/50] mtd: add mtd_set_ecclayout() helper function

2016-03-30 Thread Boris Brezillon
Add an mtd_set_ecclayout() helper function to avoid direct accesses to the mtd->ecclayout field. This will ease future reworks of ECC layout definition. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- include/linux/mtd/mtd.h | 6 ++ 1 file changed, 6 i

[PATCH v5 31/50] mtd: nand: fsl_ifc: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/fsl_ifc_nand.c | 230 1 file changed, 66 insertions(+

[PATCH v5 33/50] mtd: nand: fsmc: get rid of the fsmc_nand_eccplace struct

2016-03-30 Thread Boris Brezillon
Now that mtd_ooblayout_ecc() returns the ECC byte position using the OOB free method, we can get rid of the fsmc_nand_eccplace struct. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/fsmc_nand.c | 60 +++- i

[PATCH v5 29/50] mtd: nand: docg4: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/docg4.c | 33 - 1 file changed, 28 insertions(+), 5 deletions(-)

[PATCH v5 37/50] mtd: nand: lpc32xx: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/lpc32xx_mlc.c | 50 -- drivers/mtd/nand/lpc32xx_slc.

[PATCH v5 49/50] mtd: nand: kill the ecc->layout field

2016-03-30 Thread Boris Brezillon
Now that all NAND drivers have switch to mtd_ooblayout_ops, we can kill the ecc->layout field. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/nand_base.c | 7 --- drivers/mtd/nand/nand_bch.c | 9 - include/linux/mtd/nand.h

[PATCH v5 44/50] mtd: nand: sunxi: switch to mtd_ooblayout_ops

2016-03-30 Thread Boris Brezillon
Implementing the mtd_ooblayout_ops interface is the new way of exposing ECC/OOB layout to MTD users. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/sunxi_nand.c | 114 +++--- 1 file changed, 52 insertions(

Re: [PATCH v5 22/50] mtd: nand: atmel: switch to mtd_ooblayout_ops

2016-04-13 Thread Boris Brezillon
On Wed, 30 Mar 2016 18:14:37 +0200 Boris Brezillon <boris.brezil...@free-electrons.com> wrote: > Implementing the mtd_ooblayout_ops interface is the new way of exposing > ECC/OOB layout to MTD users. > > Signed-off-by: Boris Brezillon <boris.brezil...@free-e

Re: [PATCH v5 04/50] mtd: nand: atmel: use mtd_ooblayout_xxx() helpers where appropriate

2016-04-13 Thread Boris Brezillon
On Wed, 30 Mar 2016 18:14:19 +0200 Boris Brezillon <boris.brezil...@free-electrons.com> wrote: > The mtd_ooblayout_xxx() helper functions have been added to avoid direct > accesses to the ecclayout field, and thus ease for future reworks. > Use these helpers in all places wh

Re: [PATCH v5 00/52] mtd: rework ECC layout definition

2016-04-13 Thread Boris Brezillon
On Wed, 30 Mar 2016 18:14:15 +0200 Boris Brezillon <boris.brezil...@free-electrons.com> wrote: > Hello, > > Hopefully the last version of this patchset (but don't be sad, I'm not > done bothering you with NAND related patches :-)). > > If possible, I'd like to have as mu

Re: [PATCH v5 39/50] mtd: nand: omap2: switch to mtd_ooblayout_ops

2016-04-19 Thread Boris Brezillon
On Tue, 19 Apr 2016 15:30:39 +0300 Roger Quadros <rog...@ti.com> wrote: > On 19/04/16 14:22, Boris Brezillon wrote: > > Hi Roger, > > > > On Tue, 19 Apr 2016 13:28:50 +0300 > > Roger Quadros <rog...@ti.com> wrote: > > > >>> @@ -1921,6 +19

Re: [PATCH v5 39/50] mtd: nand: omap2: switch to mtd_ooblayout_ops

2016-04-18 Thread Boris Brezillon
On Mon, 18 Apr 2016 17:32:49 +0300 Roger Quadros <rog...@ti.com> wrote: > Boris, > > On 30/03/16 19:14, Boris Brezillon wrote: > > Implementing the mtd_ooblayout_ops interface is the new way of exposing > > ECC/OOB layout to MTD users. > > > > Signe

Re: [PATCH v5 39/50] mtd: nand: omap2: switch to mtd_ooblayout_ops

2016-04-19 Thread Boris Brezillon
Hi Roger, On Tue, 19 Apr 2016 13:28:50 +0300 Roger Quadros wrote: > > @@ -1921,6 +1927,9 @@ static int omap_nand_probe(struct platform_device > > *pdev) > > nand_chip->ecc.correct = omap_correct_data; > > mtd_set_ooblayout(mtd, _ooblayout_ops); >

[PATCH] mtd: nand: Rename nand.h into rawnand.h

2017-08-04 Thread Boris Brezillon
and function prototypes. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> Signed-off-by: Peter Pan <peterpand...@micron.com> Cc: Jonathan Corbet <cor...@lwn.net> Cc: Sekhar Nori <nsek...@ti.com> Cc: Kevin Hilman <khil...@kernel.org> Cc: Jason Cooper <

[PATCH] mtd: nand: Rename nand.h into rawnand.h

2017-08-04 Thread Boris Brezillon
and function prototypes. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> Signed-off-by: Peter Pan <peterpand...@micron.com> Cc: Jonathan Corbet <cor...@lwn.net> Cc: Sekhar Nori <nsek...@ti.com> Cc: Kevin Hilman <khil...@kernel.org> Cc: Jason Cooper <

Re: [PATCH 06/15] mtd: make device_type const

2017-08-21 Thread Boris Brezillon
Le Sat, 19 Aug 2017 13:52:17 +0530, Bhumika Goyal a écrit : > Make this const as it is only stored in the type field of a device > structure, which is const. > Done using Coccinelle. > Applied to l2-mtd/master. Thanks, Boris > Signed-off-by: Bhumika Goyal

Re: [PATCH] mtd: nand: Rename nand.h into rawnand.h

2017-08-21 Thread Boris Brezillon
Le Fri, 4 Aug 2017 17:29:09 +0200, Boris Brezillon <boris.brezil...@free-electrons.com> a écrit : > We are planning to share more code between different NAND based > devices (SPI NAND, OneNAND and raw NANDs), but before doing that > we need to move the existing include/linux/

Re: [RFC 06/12] mtd: nand: add reworked Marvell NAND controller driver

2017-10-19 Thread Boris Brezillon
On Wed, 18 Oct 2017 16:36:23 +0200 Miquel Raynal wrote: > + > +enum marvell_nfc_variant { > + MARVELL_NFC_VARIANT_PXA3XX, > + MARVELL_NFC_VARIANT_ARMADA370, > + MARVELL_NFC_VARIANT_ARMADA_8K, > +}; > + > +/* > + * NAND controller capabilities for

Re: [RFC 03/12] mtd: nand: use a static data_interface in the nand_chip structure

2017-10-18 Thread Boris Brezillon
On Wed, 18 Oct 2017 16:36:20 +0200 Miquel Raynal wrote: > Change the data_interface field from the nand_chip structure, convert > the pointer to a static structure. You mean "embed a nand_data_interface object". Not sure the static specifier can be used to

Re: [RFC 04/12] mtd: nand: add ->exec_op() implementation

2017-10-18 Thread Boris Brezillon
n easing support for vendor specific operations, it allows the core to check whether the NAND controller will be able to execute a specific operation or not, which before that was impossible. It doesn't mean all controllers will magically support all kind of NAND operations, but at least we'll know when it d

Re: [RFC 00/12] Marvell NAND controller rework with ->exec_op()

2017-10-18 Thread Boris Brezillon
letely new driver is needed. > > As this series changes several core functions and also directly touches > multiple controller drivers, it would be great to have reviews and tests > from the concerned maintainers. Only PXA3xx SoCs are not supported yet > (explaining the RFC) as having a

Re: [RFC 05/12] dt-bindings: mtd: add Marvell NAND controller documentation

2017-10-18 Thread Boris Brezillon
On Wed, 18 Oct 2017 16:36:22 +0200 Miquel Raynal wrote: > Document the bindings for the legacy and the new bindings relative to > Marvell NAND controller driver rework. > > Signed-off-by: Miquel Raynal > --- >

Re: [PATCH 5/5] mtd: nand: add ->exec_op() implementation

2017-11-30 Thread Boris Brezillon
s (the first half), > - write 512 bytes again (the second half). > > Various other helpers are also added to ease NAND controller drivers > writing. > > This new interface should really ease the support of new vendor specific > operations, and at least report w

Re: [PATCH 1/5] mtd: nand: use usual return values for the ->erase() hook

2017-11-30 Thread Boris Brezillon
On Thu, 30 Nov 2017 18:01:28 +0100 Miquel Raynal wrote: > Avoid using specific defined values for checking returned status of the > ->erase() hook. Instead, use usual negative error values on failure, > zero otherwise. > > Signed-off-by: Miquel Raynal

Re: [PATCH 1/5] mtd: nand: use usual return values for the ->erase() hook

2017-12-01 Thread Boris Brezillon
On Thu, 30 Nov 2017 23:02:46 +0100 Miquel RAYNAL wrote: > > > diff --git a/drivers/mtd/nand/nand_base.c > > > b/drivers/mtd/nand/nand_base.c index 630048f5abdc..4d1f2bda6095 > > > 100644 --- a/drivers/mtd/nand/nand_base.c > > > +++ b/drivers/mtd/nand/nand_base.c

Re: [PATCH 0/5] Introduce the new NAND core interface: ->exec_op()

2017-12-01 Thread Boris Brezillon
d how to > implement or rework NAND controller drivers. A proper external > documentation is being written and will later be submitted. > > Thank you, > Miquèl > > > Boris Brezillon (2): > mtd: nand: provide several helpers to do common NAND operations > mtd: nan

Re: [PATCH 4/5] mtd: nand: use a static data_interface in the nand_chip structure

2017-12-01 Thread Boris Brezillon
On Thu, 30 Nov 2017 18:01:31 +0100 Miquel Raynal wrote: > Change the nand_chip structure, to embed the nand_data_interface object. > > Also remove the nand_get_default_data_interface() function that become > useless but add the initialization of the

Re: [PATCH 5/5] mtd: nand: add ->exec_op() implementation

2017-12-01 Thread Boris Brezillon
Hi Miquel, On Thu, 30 Nov 2017 23:25:38 +0100 Miquel RAYNAL wrote: > > > diff --git a/drivers/mtd/nand/nand_base.c > > > b/drivers/mtd/nand/nand_base.c index 52965a8aeb2c..46bf31aff909 > > > 100644 --- a/drivers/mtd/nand/nand_base.c > > > +++

Re: [PATCH 5/5] mtd: nand: add ->exec_op() implementation

2017-12-01 Thread Boris Brezillon
On Thu, 30 Nov 2017 18:01:32 +0100 Miquel Raynal wrote: > EXPORT_SYMBOL_GPL(nand_write_data_op); > > /** > + * struct nand_op_parser_ctx - Context used by the parser > + * @instrs: array of all the instructions that must be addressed > + * @ninstrs: length

Re: [RFC 02/12] mtd: nand: force drivers to explicitly send READ/PROG commands

2017-10-20 Thread Boris Brezillon
On Fri, 20 Oct 2017 11:29:18 +0200 Stefan Agner <ste...@agner.ch> wrote: > Hi Miquel, > > Thanks for the work on this, happy to see the new interface is moving > forward. Some comments below. > > On 2017-10-18 16:36, Miquel Raynal wrote: > > From: Boris B

[PATCH 4/5] mtd: Unconditionally update ->fail_addr and ->addr in part_erase()

2018-02-12 Thread Boris Brezillon
rase_info->callback() and are thus only taking the ->addr_fail and ->addr fields into account after part_erase() has returned. While we're at it, get rid of the erase_info->mtd field which was only needed to let mtd_erase_callback() get the partition device back. Signed-off-by: Boris Br

[PATCH 0/5] mtd: Simplify erase handling

2018-02-12 Thread Boris Brezillon
istent and allows us to get rid of a few hundred lines of code. Regards, Boris Boris Brezillon (5): mtd: Initialize ->fail_addr early in mtd_erase() mtd: Get rid of unused fields in struct erase_info mtd: Stop assuming mtd_erase() is asynchronous mtd: Unconditionally update ->fail_add

[PATCH 1/5] mtd: Initialize ->fail_addr early in mtd_erase()

2018-02-12 Thread Boris Brezillon
mtd_erase() can return an error before ->fail_addr is initialized to MTD_FAIL_ADDR_UNKNOWN. Move this initialization at the very beginning of the function. Signed-off-by: Boris Brezillon <boris.brezil...@bootlin.com> --- drivers/mtd/mtdcore.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH 5/5] mtd: Stop updating erase_info->state and calling mtd_erase_callback()

2018-02-12 Thread Boris Brezillon
>state field, all MTD_ERASE_XXX definitions and the mtd_erase_callback() function. Signed-off-by: Boris Brezillon <boris.brezil...@bootlin.com> --- drivers/mtd/chips/cfi_cmdset_0001.c | 16 ++-- drivers/mtd/chips/cfi_cmdset_0002.c | 26 +++--- dr

[PATCH 2/5] mtd: Get rid of unused fields in struct erase_info

2018-02-12 Thread Boris Brezillon
Some fields are not used by MTD drivers, users or core code. Moreover, those fields are not documented, so get rid of them to avoid any confusion. Signed-off-by: Boris Brezillon <boris.brezil...@bootlin.com> --- include/linux/mtd/mtd.h | 5 - 1 file changed, 5 deletions(-) diff

Re: [PATCH 5/5] mtd: Stop updating erase_info->state and calling mtd_erase_callback()

2018-02-13 Thread Boris Brezillon
erase->state = MTD_ERASE_DONE; > > - } > > - mtd_erase_callback(erase); > > + > > return rc; > > } > > > > diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c > > index 0ec85f316d24..2f05e1801047

Re: [PATCH] staging:mt29f_spinand: MT29F2G failing as only 16-bit arguments and variables used for addressing.

2018-08-01 Thread Boris Brezillon
Hi Jheng-Jhong, On Wed, 1 Aug 2018 11:24:19 +0800 Jheng-Jhong Wu wrote: > For NAND flash chips with more than 1Gbit (e.g. MT29F2G) more than 16 bits > are necessary to address the correct page. The driver sets the address for > more than 16 bits, but it uses 16-bit arguments and variables

Re: [PATCH] staging:mt29f_spinand: MT29F2G failing as only 16-bit arguments and variables used for addressing.

2018-08-06 Thread Boris Brezillon
On Mon, 6 Aug 2018 15:01:37 +0300 Dan Carpenter wrote: > On Mon, Aug 06, 2018 at 01:46:48PM +0200, Boris Brezillon wrote: > > Hi Dan, > > > > On Wed, 1 Aug 2018 15:05:51 +0300 > > Dan Carpenter wrote: > > > > > On Wed, Aug 01, 2018

Re: [PATCH] staging:mt29f_spinand: MT29F2G failing as only 16-bit arguments and variables used for addressing.

2018-08-06 Thread Boris Brezillon
Hi Dan, On Wed, 1 Aug 2018 15:05:51 +0300 Dan Carpenter wrote: > On Wed, Aug 01, 2018 at 11:24:19AM +0800, Jheng-Jhong Wu wrote: > > For NAND flash chips with more than 1Gbit (e.g. MT29F2G) more than 16 bits > > are necessary to address the correct page. The driver sets the address for > > more

[PATCH 14/23] mtd: rawnand: Pass a nand_chip object to chip->cmd_ctrl()

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->cmd_ctrl() hook. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/ams-delt

[PATCH 10/23] mtd: rawnand: Pass a nand_chip object to chip->read_xxx() hooks

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle all chip->read_xxx() hooks at once. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/

[PATCH 15/23] mtd: rawnand: Pass a nand_chip object to chip->dev_ready()

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->dev_ready() hook. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/ams-delt

[PATCH 16/23] mtd: rawnand: Pass a nand_chip object to chip->cmdfunc()

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->cmdfunc() hook. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/au1550n

[PATCH 09/23] mtd: rawnand: Pass a nand_chip object to ecc->write_xxx() hooks

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle all ecc->write_xxx() hooks at once. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/atmel/n

[PATCH 08/23] mtd: rawnand: Pass a nand_chip object to ecc->read_xxx() hooks

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle all ecc->read_xxx() hooks at once. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/atmel/n

[PATCH 11/23] mtd: rawnand: Pass a nand_chip object to chip->write_xxx() hooks

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle all chip->write_xxx() hooks at once. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/

[PATCH 13/23] mtd: rawnand: Pass a nand_chip object to chip->block_xxx() hooks

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle all chip->block_xxx() hooks at once. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/

[PATCH 23/23] mtd: rawnand: Pass a nand_chip object nand_erase_nand()

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the nand_erase_nand() helper. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/nand_base.c | 10

[PATCH 04/23] mtd: rawnand: Pass a nand_chip object to nand_wait_ready()

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers to take a nand_chip object instead of an mtd_info one. Now is nand_wait_ready()'s turn. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/bcm47xxnflash/ops_bcm4706.c | 2 +- drivers/mtd/nand/raw/cafe_nand.c

[PATCH 12/23] mtd: rawnand: Pass a nand_chip object to chip->select_chip()

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->select_chip() hook. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/atmel/n

[PATCH 01/23] mtd: rawnand: plat_nand: Pass a nand_chip object to all platform_nand_ctrl hooks

2018-08-17 Thread Boris Brezillon
of an mtd_info. We had temporary plat_nand_xxx() wrappers to the do the mtd -> chip conversion, but those will be dropped when doing the patching nand_chip hooks to take a nand_chip object. Signed-off-by: Boris Brezillon --- arch/arm/mach-ep93xx/snappercl15.c | 7 ++-- arch/arm/mach-ep93xx/ts72x

[PATCH 18/23] mtd: rawnand: Pass a nand_chip object to chip->erase()

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->erase() hook. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/denali.c

[PATCH 06/23] mtd: rawnand: Pass a nand_chip object to ecc->calculate()

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one. Now is ecc->calculate()'s turn. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/cs553x_nand.c | 4 ++-- drivers/mtd/nand/raw/davinci_nand.c |

[PATCH 19/23] mtd: rawnand: Pass a nand_chip object to chip->{get, set}_features()

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->{get,set}_features() hooks. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/

[PATCH 02/23] mtd: rawnand: Pass a nand_chip object to nand_scan() & co

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers to take a nand_chip object instead of an mtd_info one. We start with all variants of nand_scan(). Signed-off-by: Boris Brezillon --- Documentation/driver-api/mtdnand.rst | 2 +- drivers/mtd/nand/raw/ams-delta.c

[PATCH 03/23] mtd: rawnand: Pass a nand_chip object to nand_release()

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers to take a nand_chip object instead of an mtd_info one. Now is nand_release()'s turn. Signed-off-by: Boris Brezillon --- Documentation/driver-api/mtdnand.rst | 2 +- drivers/mtd/nand/raw/ams-delta.c | 2 +- drivers

[PATCH 07/23] mtd: rawnand: Pass a nand_chip object to ecc->correct()

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one. Now is ecc->correct()'s turn. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/davinci_nand.c | 9 - drivers/mtd/nand/raw/diskonchip.c |

[PATCH 21/23] mtd: rawnand: Pass a nand_chip object to chip->setup_data_interface()

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->setup_data_interface() hook. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/at

[PATCH 20/23] mtd: rawnand: Pass a nand_chip object to chip->setup_read_retry()

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->setup_read_retry() hook. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/nand_bas

[PATCH 17/23] mtd: rawnand: Pass a nand_chip object to chip->waitfunc()

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the chip->waitfunc() hook. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/atmel/n

[PATCH 22/23] mtd: rawnand: Pass a nand_chip object to all nand_xxx_bbt() helpers

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the nand_xxx_bbt() helpers. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/nand_base.c | 6

[PATCH 05/23] mtd: rawnand: Pass a nand_chip object to ecc->hwctl()

2018-08-17 Thread Boris Brezillon
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one. Now is ecc->hwctl()'s turn. Signed-off-by: Boris Brezillon --- drivers/mtd/nand/raw/cs553x_nand.c | 3 +-- drivers/mtd/nand/raw/davinci_nand.c |

<    1   2   3   4   5   6   >