Re: [PATCH v4 01/58] mtd: nand: denali: add missing nand_release() call in denali_remove()

2015-12-11 Thread Boris Brezillon
Hi Brian, On Thu, 10 Dec 2015 16:40:08 -0800 Brian Norris <computersforpe...@gmail.com> wrote: > On Thu, Dec 10, 2015 at 08:59:45AM +0100, Boris Brezillon wrote: > > Unregister the NAND device from the NAND subsystem when removing a denali > > NAND controller, other

Re: [PATCH v4 01/58] mtd: nand: denali: add missing nand_release() call in denali_remove()

2015-12-11 Thread Boris Brezillon
Hi Brian, On Thu, 10 Dec 2015 16:40:08 -0800 Brian Norris <computersforpe...@gmail.com> wrote: > On Thu, Dec 10, 2015 at 08:59:45AM +0100, Boris Brezillon wrote: > > Unregister the NAND device from the NAND subsystem when removing a denali > > NAND controller, other

[PATCH v2 09/25] mtd: nand: embed an mtd_info structure into nand_chip

2015-12-01 Thread Boris Brezillon
. This change will also help factorizing boilerplate code copied in all NAND drivers. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- include/linux/mtd/nand.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h

[PATCH v2 01/25] ARM: nand: make use of mtd_to_nand() where appropriate

2015-12-01 Thread Boris Brezillon
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all ARM specific implementations to use this helper. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- arch/arm/mach-ep93xx/snappercl15.c | 4 ++-- arch/arm/mach-ep93xx

[PATCH v2 08/25] staging: mt29f_spinand: make use of mtd_to_nand()

2015-12-01 Thread Boris Brezillon
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Use it where appropriate. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/staging/mt29f_spinand/mt29f_spinand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH v2 06/25] mtd: nand: make use of mtd_to_nand() in NAND core code

2015-12-01 Thread Boris Brezillon
mtd_to_nand() was recently introduced to avoid direct access to the mtd->priv field. Update core code to use mtd_to_nand(). Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/nand_base.c | 84 ++-- drivers

[PATCH v2 00/25] mtd: nand: refactor the NAND subsystem (part 1)

2015-12-01 Thread Boris Brezillon
s done by coccinelle scripts to improve readability and fix coding style issues Boris Brezillon (25): ARM: nand: make use of mtd_to_nand() where appropriate blackfin: nand: make use of mtd_to_nand() where appropriate cris: nand: make use of mtd_to_nand() where appropriate mips: nand: ma

[PATCH v2 03/25] cris: nand: make use of mtd_to_nand() where appropriate

2015-12-01 Thread Boris Brezillon
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all CRIS specific implementations to use this helper. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- arch/cris/arch-v32/drivers/mach-a3/nandflash.c | 2 +- arch/cris

[PATCH v2 05/25] sh: nand: make use of mtd_to_nand() where appropriate

2015-12-01 Thread Boris Brezillon
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all SH specific implementations to use this helper. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- arch/sh/boards/mach-migor/setup.c | 2 +- 1 file changed, 1 insert

[PATCH v2 02/25] blackfin: nand: make use of mtd_to_nand() where appropriate

2015-12-01 Thread Boris Brezillon
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all blackfin specific implementations to use this helper. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- arch/blackfin/mach-bf537/boards/stamp.c | 2 +- arch/blac

[PATCH v2 21/25] mtd: nand: kill the chip->flash_node field

2015-12-01 Thread Boris Brezillon
Now that the nand_chip struct directly embeds an mtd_info struct we can get rid of the ->flash_node field and forward set/get_flash_node requests to the MTD layer. As a side effect, we no longer need the mtd_set_of_node() call done in nand_dt_init(). Signed-off-by: Boris Brezillon <boris.

[PATCH v2 17/25] mtd: nand: remove useless mtd->priv = chip assignments

2015-12-01 Thread Boris Brezillon
mtd_to_nand() now uses the container_of() approach to transform an mtd_info pointer into a nand_chip one. Drop useless mtd->priv assignments from NAND controller drivers. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Patch generated with the following coccinel

[PATCH v2 15/25] cris: nand: use the mtd instance embedded in struct nand_chip

2015-12-01 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Patch all drivers to make use of this mtd instance instead of using the instance embedded in their private struct or dynamically allocated. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Most of those changes were gen

[PATCH v2 16/25] mtd: nand: update mtd_to_nand()

2015-12-01 Thread Boris Brezillon
roller drivers. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- include/linux/mtd/nand.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 8ec071e..873646d 100644 --- a/include/linux/mtd/

[PATCH v2 11/25] coccinelle: nand: detect and correct drivers embedding an mtd_info object

2015-12-01 Thread Boris Brezillon
Add nand-priv-no-mtd.cocci to detect and correct NAND controller drivers directly embedding an mtd_info struct in their private struct. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> Cc: Julia Lawall <julia.law...@lip6.fr> --- Hi Julia, Not sure this is the

[PATCH v2 04/25] mips: nand: make use of mtd_to_nand() where appropriate

2015-12-01 Thread Boris Brezillon
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all MIPS specific implementations to use this helper. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- arch/mips/alchemy/devboards/db1200.c | 2 +- arch/mips/alchemy/

[PATCH v2 13/25] mtd: nand: update the documentation to reflect framework changes

2015-12-01 Thread Boris Brezillon
The MTD device is now directly embedded in the nand_chip struct. Update the mtdnand documentation to mention this aspect and fix the different examples. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Documentation/DocBook/mtdnand.tmp

[PATCH v2 22/25] mtd: nand: add helpers to access ->priv

2015-12-01 Thread Boris Brezillon
Add two helpers to access the field reserved for private controller data. This makes it clearer what this field is reserved for and ease future refactoring. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- include/linux/mtd/nand.h | 10 ++ 1 file chang

[PATCH v2 25/25] staging: mt29f_spinand: make use of nand_set/get_controller_data() helpers

2015-12-01 Thread Boris Brezillon
New helpers have been added to avoid directly accessing chip->field. Use them where appropriate. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/staging/mt29f_spinand/mt29f_spinand.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) d

[PATCH v2 20/25] mtd: nand: simplify nand_dt_init() usage

2015-12-01 Thread Boris Brezillon
nand_dt_init() function requires 3 arguments where it actually needs one (dn and mtd can both be retrieved from chip). Drop these parameters. Testing for dn != NULL inside nand_dt_init() also helps simplifying the caller code. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.

[PATCH v2 18/25] cris: nand: remove useless mtd->priv = chip assignments

2015-12-01 Thread Boris Brezillon
mtd_to_nand() now uses the container_of() approach to transform an mtd_info pointer into a nand_chip one. Drop useless mtd->priv assignments from NAND controller drivers. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Patch generated with the following coccinel

[PATCH v2 12/25] mtd: nand: use the mtd instance embedded in struct nand_chip

2015-12-01 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Patch all drivers to make use of this mtd instance instead of using the instance embedded in their private struct or dynamically allocated. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> Cc: Julia Lawall <julia.law..

[PATCH v2 23/25] ARM: make use of nand_set/get_controller_data() helpers

2015-12-01 Thread Boris Brezillon
New helpers have been added to avoid directly accessing chip->field. Use them where appropriate. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- arch/arm/mach-ixp4xx/ixdp425-setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH v2 24/25] mtd: nand: make use of nand_set/get_controller_data() helpers

2015-12-01 Thread Boris Brezillon
New helpers have been added to avoid directly accessing chip->field. Use them where appropriate. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/ams-delta.c | 6 +-- drivers/mtd/nand/atmel_nand.c

[PATCH v2 19/25] staging: mt29f_spinand: remove useless mtd->priv = chip assignment

2015-12-01 Thread Boris Brezillon
mtd_to_nand() now uses the container_of() approach to transform an mtd_info pointer into a nand_chip one. Drop useless mtd->priv assignments from NAND controller drivers. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Patch generated with the following coccinel

[PATCH v3 12/25] mtd: nand: use the mtd instance embedded in struct nand_chip

2015-12-01 Thread Boris Brezillon
struct nand_chip now embeds an mtd device. Patch all drivers to make use of this mtd instance instead of using the instance embedded in their private struct or dynamically allocated. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> Cc: Julia Lawall <julia.law..

Re: [PATCH v2 11/25] coccinelle: nand: detect and correct drivers embedding an mtd_info object

2015-12-01 Thread Boris Brezillon
Hi, On Tue, 1 Dec 2015 12:17:44 +0100 (CET) Julia Lawall <julia.law...@lip6.fr> wrote: > > > On Tue, 1 Dec 2015, Boris Brezillon wrote: > > > Add nand-priv-no-mtd.cocci to detect and correct NAND controller drivers > > directly embedding an mtd_info

[PATCH v2 36/51] mtd: nand: gpmi: switch to mtd_ooblayout_ops

2016-02-04 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 v2 34/51] mtd: nand: fsl_ifc: switch to mtd_ooblayout_ops

2016-02-04 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 | 232 1 file changed, 67 insertions(+

[PATCH v2 46/51] mtd: nand: sunxi: switch to mtd_ooblayout_ops

2016-02-04 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(

[PATCH v2 45/51] mtd: nand: sm_common: switch to mtd_ooblayout_ops

2016-02-04 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 v2 50/51] mtd: nand: kill the ecc->layout field

2016-02-04 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 | 8 drivers/mtd/nand/nand_bch.c | 9 - include/linux/mtd/nand.h

[PATCH v2 47/51] mtd: nand: vf610: switch to mtd_ooblayout_ops

2016-02-04 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 v2 51/51] mtd: kill the nand_ecclayout struct

2016-02-04 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 v2 40/51] mtd: nand: mxc: switch to mtd_ooblayout_ops

2016-02-04 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 v2 29/51] mtd: nand: davinci: switch to mtd_ooblayout_ops

2016-02-04 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 v2 43/51] mtd: nand: s3c2410: switch to mtd_ooblayout_ops

2016-02-04 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 v2 44/51] mtd: nand: sh_flctl: switch to mtd_ooblayout_ops

2016-02-04 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 v2 49/51] staging: mt29f_spinand: switch to mtd_ooblayout_ops

2016-02-04 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 v2 22/51] mtd: nand: bch: switch to mtd_ooblayout_ops

2016-02-04 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 v2 23/51] mtd: nand: sharpsl: switch to mtd_ooblayout_ops

2016-02-04 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 v2 10/51] mtd: nand: gpmi: use mtd_ooblayout_xxx() helpers where appropriate

2016-02-04 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 v2 00/51] mtd: rework ECC layout definition

2016-02-04 Thread Boris Brezillon
ease ECC and free bytes manipulation - separated driver changes in different commits to ease review - dropped already applied patches Boris Brezillon (51): mtd: kill the ecclayout->oobavail field mtd: create an mtd_oobavail() helper and make use of it mtd: mtdswap: remove useless if (!mtd-&

[PATCH v2 08/51] mtd: nand: atmel: use mtd_ooblayout_xxx() helpers where appropriate

2016-02-04 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 v2 02/51] mtd: create an mtd_oobavail() helper and make use of it

2016-02-04 Thread Boris Brezillon
Currently, all MTD drivers/sublayers exposing an OOB area are doing the same kind of test to extract the available OOB size based on the mtd_info and mtd_oob_ops structures. Move this common logic into an inline function and make use of it. Signed-off-by: Boris Brezillon <boris.brezil...@f

[PATCH v2 07/51] mtd: nand: core: use mtd_ooblayout_xxx() helpers where appropriate

2016-02-04 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 v2 12/51] mtd: nand: omap2: use mtd_ooblayout_xxx() helpers where appropriate

2016-02-04 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 v2 03/51] mtd: mtdswap: remove useless if (!mtd->ecclayout) test

2016-02-04 Thread Boris Brezillon
If the MTD device does not have OOB, the mtd->oobsize and mtd->oobavail fields are set to zero, and we are testing those values in the following test. Remove the useless if (!mtd->ecclayout) test. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mt

[PATCH v2 06/51] mtd: use mtd_ooblayout_xxx() helpers where appropriate

2016-02-04 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 v2 25/51] mtd: nand: atmel: switch to mtd_ooblayout_ops

2016-02-04 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 v2 11/51] mtd: nand: lpc32xx: use mtd_ooblayout_xxx() helpers where appropriate

2016-02-04 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 v2 05/51] mtd: add mtd_ooblayout_xxx() helper functions

2016-02-04 Thread Boris Brezillon
In order to make the ecclayout definition completely dynamic we need to rework the way the OOB layout are defined and iterated. Create a few mtd_ooblayout_xxx() helpers to ease OOB bytes manipulation and hide ecclayout internals to their users. Signed-off-by: Boris Brezillon <boris.bre

[PATCH v2 01/51] mtd: kill the ecclayout->oobavail field

2016-02-04 Thread Boris Brezillon
ecclayout->oobavail is just redundant with the mtd->oobavail field. Moreover, it prevents static const definition of ecc layouts since the NAND framework is calculating this value based on the ecclayout->oobfree field. Signed-off-by: Boris Brezillon <boris.brezil...@free-e

[PATCH v2 04/51] mtd: nand: simplify nand_bch_init() usage

2016-02-04 Thread Boris Brezillon
. Fallback to eccbytes calculation when it is set to 0. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/mtd/nand/nand_base.c | 6 ++ drivers/mtd/nand/nand_bch.c | 27 +-- drivers/mtd/nand/omap2.c | 28 i

[PATCH v2 09/51] mtd: nand: fsl_ifc: use mtd_ooblayout_xxx() helpers where appropriate

2016-02-04 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 v2 24/51] mtd: nand: jz4740: switch to mtd_ooblayout_ops

2016-02-04 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 v2 30/51] mtd: nand: denali: switch to mtd_ooblayout_ops

2016-02-04 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 | 51 +-- 1 file changed, 36 insertions(

[PATCH v2 38/51] mtd: nand: jz4780: switch to mtd_ooblayout_ops

2016-02-04 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/jz4780_nand.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff

[PATCH v2 27/51] mtd: nand: brcm: switch to mtd_ooblayout_ops

2016-02-04 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 v2 37/51] mtd: nand: hisi504: switch to mtd_ooblayout_ops

2016-02-04 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 | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-)

[PATCH v2 15/51] mtd: use mtd_set_ecclayout() where appropriate

2016-02-04 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 v2 19/51] mtd: create an mtd_ooblayout_ops struct to ease ECC layout definition

2016-02-04 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 v2 32/51] mtd: nand: docg4: switch to mtd_ooblayout_ops

2016-02-04 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 v2 18/51] mtd: docg3: use mtd_set_ecclayout() where appropriate

2016-02-04 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/devices/docg3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/devices/docg3.c

[PATCH v2 21/51] mtd: nand: implement the default mtd_ooblayout_ops

2016-02-04 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 | 147 --- include/linux/mtd/

[PATCH v2 35/51] mtd: nand: fsmc: switch to mtd_ooblayout_ops

2016-02-04 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 | 300 --- 1 file changed, 84 insertions(+

[PATCH v2 13/51] mtd: onenand: use mtd_ooblayout_xxx() helpers where appropriate

2016-02-04 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 v2 17/51] mtd: onenand: use mtd_set_ecclayout() where appropriate

2016-02-04 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 v2 33/51] mtd: nand: fsl_elbc: switch to mtd_ooblayout_ops

2016-02-04 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_elbc_nand.c | 83 +++- 1 file changed, 47 insertions(

[PATCH v2 28/51] mtd: nand: cafe: switch to mtd_ooblayout_ops

2016-02-04 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 | 45 1 file changed, 33 insertions(

[PATCH v2 20/51] mtd: docg3: switch to mtd_ooblayout_ops

2016-02-04 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/devices/docg3.c | 38 +- 1 file changed, 33 insertions(+), 5 deletions(-) diff

[PATCH v2 31/51] mtd: nand: diskonchip: switch to mtd_ooblayout_ops

2016-02-04 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 | 38 +- 1 file changed, 33 insertions(+), 5 del

[PATCH v2 26/51] mtd: nand: bf5xx: switch to mtd_ooblayout_ops

2016-02-04 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 v2 14/51] mtd: add mtd_set_ecclayout() helper function

2016-02-04 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 v2 16/51] mtd: nand: use mtd_set_ecclayout() where appropriate

2016-02-04 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 v2 39/51] mtd: nand: lpc32xx: switch to mtd_ooblayout_ops

2016-02-04 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 v2 48/51] mtd: onenand: switch to mtd_ooblayout_ops

2016-02-04 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 v2 42/51] mtd: nand: pxa3xx: switch to mtd_ooblayout_ops

2016-02-04 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/pxa3xx_nand.c | 104 + 1 file changed, 64 insertions(

[PATCH v2 41/51] mtd: nand: omap2: switch to mtd_ooblayout_ops

2016-02-04 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/omap2.c | 194 +++ 1 file changed, 113 insertions(

Re: [PATCH v2 05/51] mtd: add mtd_ooblayout_xxx() helper functions

2016-02-04 Thread Boris Brezillon
On Thu, 4 Feb 2016 11:06:28 +0100 Boris Brezillon <boris.brezil...@free-electrons.com> wrote: > In order to make the ecclayout definition completely dynamic we need to > rework the way the OOB layout are defined and iterated. > > Create a few mtd_ooblayout_xxx() helpers

Re: [PATCH v2 07/51] mtd: nand: core: use mtd_ooblayout_xxx() helpers where appropriate

2016-02-05 Thread Boris Brezillon
On Thu, 4 Feb 2016 11:06:30 +0100 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 v2 05/51] mtd: add mtd_ooblayout_xxx() helper functions

2016-02-05 Thread Boris Brezillon
On Thu, 4 Feb 2016 11:06:28 +0100 Boris Brezillon <boris.brezil...@free-electrons.com> wrote: > In order to make the ecclayout definition completely dynamic we need to > rework the way the OOB layout are defined and iterated. > > Create a few mtd_ooblayout_xxx() helpers

Re: [PATCH v3 48/52] mtd: nand: vf610: switch to mtd_ooblayout_ops

2016-02-26 Thread Boris Brezillon
Hi Stephan, On Fri, 26 Feb 2016 11:43:46 -0800 Stefan Agner <ste...@agner.ch> wrote: > Hi Boris, > > On 2016-02-25 16:57, Boris Brezillon wrote: > > Implementing the mtd_ooblayout_ops interface is the new way of exposing > > ECC/OOB layout to MTD users. > > &

Re: [PATCH v3 07/52] mtd: nand: core: use mtd_ooblayout_xxx() helpers where appropriate

2016-02-26 Thread Boris Brezillon
Hi Harvey, On Fri, 26 Feb 2016 14:35:08 + Harvey Hunt <harvey.h...@imgtec.com> wrote: > Hi Boris, > > On 26/02/16 00:57, Boris Brezillon wrote: > > The mtd_ooblayout_xxx() helper functions have been added to avoid direct > > accesses to the ecclayout field, and t

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

2016-02-25 Thread Boris Brezillon
On Thu, 25 Feb 2016 17:27:23 -0800 Stefan Agner <ste...@agner.ch> wrote: > Hi Boris, > > On 2016-02-25 16:57, Boris Brezillon wrote: > > Hello, > > > > This patchset aims at getting rid of the nand_ecclayout limitations. > > struct nand_ecclayout is d

Re: [PATCH v3 07/52] mtd: nand: core: use mtd_ooblayout_xxx() helpers where appropriate

2016-02-26 Thread Boris Brezillon
Hi Harvey, On Fri, 26 Feb 2016 15:17:28 + Harvey Hunt <harvey.h...@imgtec.com> wrote: > Hi Boris, > > On 26/02/16 15:10, Boris Brezillon wrote: > > Hi Harvey, > > > > On Fri, 26 Feb 2016 14:35:08 + > > Harvey Hunt <harvey.h...@imgtec

[PATCH v3 22/52] mtd: nand: bch: switch to mtd_ooblayout_ops

2016-02-25 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 v3 20/52] mtd: docg3: switch to mtd_ooblayout_ops

2016-02-25 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 v3 21/52] mtd: nand: implement the default mtd_ooblayout_ops

2016-02-25 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 v3 23/52] mtd: nand: sharpsl: switch to mtd_ooblayout_ops

2016-02-25 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 v3 24/52] mtd: nand: jz4740: switch to mtd_ooblayout_ops

2016-02-25 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 v3 28/52] mtd: nand: cafe: switch to mtd_ooblayout_ops

2016-02-25 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 | 45 1 file changed, 33 insertions(

[PATCH v3 29/52] mtd: nand: davinci: switch to mtd_ooblayout_ops

2016-02-25 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 v3 27/52] mtd: nand: brcm: switch to mtd_ooblayout_ops

2016-02-25 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 v3 26/52] mtd: nand: bf5xx: switch to mtd_ooblayout_ops

2016-02-25 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 v3 25/52] mtd: nand: atmel: switch to mtd_ooblayout_ops

2016-02-25 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 v3 40/52] mtd: nand: lpc32xx: switch to mtd_ooblayout_ops

2016-02-25 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 v3 43/52] mtd: nand: pxa3xx: switch to mtd_ooblayout_ops

2016-02-25 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/pxa3xx_nand.c | 104 + 1 file changed, 64 insertions(

[PATCH v3 34/52] mtd: nand: fsl_ifc: switch to mtd_ooblayout_ops

2016-02-25 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 | 231 1 file changed, 67 insertions(+

[PATCH v3 35/52] mtd: nand: fsmc: switch to mtd_ooblayout_ops

2016-02-25 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(+

<    1   2   3   4   5   6   >