linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/27] mtd: nand: refactor the NAND subsystem (part 1)
@ 2015-11-16 13:37 Boris Brezillon
  2015-11-16 13:37 ` [PATCH 02/27] mtd: nand: add an mtd_to_nand() helper Boris Brezillon
                   ` (12 more replies)
  0 siblings, 13 replies; 38+ messages in thread
From: Boris Brezillon @ 2015-11-16 13:37 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Jonathan Corbet,
	linux-doc-u79uwXL29TY76Z2rM5mHXA, Hartley Sweeten, Ryan Mallon,
	Shawn Guo, Sascha Hauer, Imre Kaloz, Krzysztof Halasa,
	Tony Lindgren, linux-omap-u79uwXL29TY76Z2rM5mHXA,
	Alexander Clouter, Thomas Petazzoni, Gregory CLEMENT,
	Jason Cooper, Sebastian Hesselbarth, Andrew Lunn, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Marek Vasut, Steven Miao

Hello,

This huge series aims at clarifying the relationship between the mtd and
nand_chip structures and hiding NAND framework internals to NAND
controller drivers.

The first part of the series provide an mtd_to_nand() helper to hide the
way mtd and nand_chip are linked together.

The second part of the series embeds the mtd structure into the nand_chip
one so that NAND controller drivers don't have to bother allocating the
MTD device and linking it with the NAND chip.

The last part of the series hides accesses to the chip->priv field behind
two helper functions.

This allows removal of some of the boilerplate code done in all NAND
controller drivers, but most importantly, it unifies a bit the way NAND
chip structures are instantiated (even though we still have two different
kinds of drivers: those embedding the nand_chip struct into their private
nand chip representation, and those allocating two different structures
and linking them together with the chip->priv field).

As said in the title, this refactoring is only the first step. I plan to
rework the NAND controller / NAND chip separation for pretty much the same
reasons: clarifying the separation between the two concepts, and getting
rid of more boilerplate code in NAND controller drivers.

Stay tuned ;-).

Best Regards,

Boris

Boris Brezillon (27):
  mtd: nand: fix drivers abusing mtd->priv
  mtd: nand: add an mtd_to_nand() helper
  mtd: nand: update examples in the documentation to use mtd_to_nand()
  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: make use of mtd_to_nand() where appropriate
  sh: nand: make use of mtd_to_nand() where appropriate
  mtd: nand: make use of mtd_to_nand() in NAND core code
  mtd: nand: make use of mtd_to_nand() in NAND drivers
  staging: mt29f_spinand: make use of mtd_to_nand()
  mtd: nand: embed an mtd_info structure into nand_chip
  mtd: nand: add nand_to_mtd() helper
  mtd: nand: use the mtd instance embedded in struct nand_chip
  mtd: nand: update the documentation to reflect framework changes
  staging: mt29f_spinand: use the mtd instance embedded in struct
    nand_chip
  cris: nand: use the mtd instance embedded in struct nand_chip
  mtd: nand: update mtd_to_nand()
  mtd: nand: remove useless mtd->priv = chip assignments
  cris: nand: remove useless mtd->priv = chip assignments
  staging: mt29f_spinand: remove useless mtd->priv = chip assignment
  mtd: nand: simplify nand_dt_init() usage
  mtd: nand: kill the chip->flash_node field
  mtd: nand: add helpers to access ->priv
  ARM: make use of nand_set/get_controller_data() helpers
  mtd: nand: make use of nand_set/get_controller_data() helpers
  staging: mt29f_spinand: make use of nand_set/get_controller_data()
    helpers

 Documentation/DocBook/mtdnand.tmpl             |  35 +++---
 arch/arm/mach-ep93xx/snappercl15.c             |   4 +-
 arch/arm/mach-ep93xx/ts72xx.c                  |   4 +-
 arch/arm/mach-imx/mach-qong.c                  |   2 +-
 arch/arm/mach-ixp4xx/ixdp425-setup.c           |   6 +-
 arch/arm/mach-omap1/board-nand.c               |   2 +-
 arch/arm/mach-orion5x/ts78xx-setup.c           |   6 +-
 arch/arm/mach-pxa/balloon3.c                   |   2 +-
 arch/arm/mach-pxa/em-x270.c                    |   2 +-
 arch/arm/mach-pxa/palmtx.c                     |   2 +-
 arch/blackfin/mach-bf537/boards/stamp.c        |   2 +-
 arch/blackfin/mach-bf561/boards/acvilon.c      |   2 +-
 arch/cris/arch-v32/drivers/mach-a3/nandflash.c |   8 +-
 arch/cris/arch-v32/drivers/mach-fs/nandflash.c |   8 +-
 arch/mips/alchemy/devboards/db1200.c           |   2 +-
 arch/mips/alchemy/devboards/db1300.c           |   2 +-
 arch/mips/alchemy/devboards/db1550.c           |   2 +-
 arch/mips/pnx833x/common/platform.c            |   2 +-
 arch/mips/rb532/devices.c                      |   2 +-
 arch/sh/boards/mach-migor/setup.c              |   2 +-
 drivers/mtd/nand/ams-delta.c                   |  26 ++---
 drivers/mtd/nand/atmel_nand.c                  | 116 ++++++++++---------
 drivers/mtd/nand/au1550nd.c                    |  40 +++----
 drivers/mtd/nand/bcm47xxnflash/bcm47xxnflash.h |   1 -
 drivers/mtd/nand/bcm47xxnflash/main.c          |   9 +-
 drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c   |  34 +++---
 drivers/mtd/nand/bf5xx_nand.c                  |  27 +++--
 drivers/mtd/nand/brcmnand/brcmnand.c           |  54 +++++----
 drivers/mtd/nand/cafe_nand.c                   |  41 ++++---
 drivers/mtd/nand/cmx270_nand.c                 |  20 ++--
 drivers/mtd/nand/cs553x_nand.c                 |  30 +++--
 drivers/mtd/nand/davinci_nand.c                |  33 +++---
 drivers/mtd/nand/denali.c                      |  61 +++++-----
 drivers/mtd/nand/denali.h                      |   1 -
 drivers/mtd/nand/diskonchip.c                  | 148 ++++++++++++-------------
 drivers/mtd/nand/docg4.c                       |  93 ++++++++--------
 drivers/mtd/nand/fsl_elbc_nand.c               |  58 +++++-----
 drivers/mtd/nand/fsl_ifc_nand.c                |  67 ++++++-----
 drivers/mtd/nand/fsl_upm.c                     |  30 ++---
 drivers/mtd/nand/fsmc_nand.c                   |  72 ++++++------
 drivers/mtd/nand/gpio.c                        |  16 +--
 drivers/mtd/nand/gpmi-nand/gpmi-lib.c          |   2 +-
 drivers/mtd/nand/gpmi-nand/gpmi-nand.c         |  67 ++++++-----
 drivers/mtd/nand/gpmi-nand/gpmi-nand.h         |   1 -
 drivers/mtd/nand/hisi504_nand.c                |  48 ++++----
 drivers/mtd/nand/jz4740_nand.c                 |  14 +--
 drivers/mtd/nand/lpc32xx_mlc.c                 |  32 +++---
 drivers/mtd/nand/lpc32xx_slc.c                 |  42 ++++---
 drivers/mtd/nand/mpc5121_nfc.c                 |  52 +++++----
 drivers/mtd/nand/mxc_nand.c                    |  76 +++++++------
 drivers/mtd/nand/nand_base.c                   | 102 +++++++++--------
 drivers/mtd/nand/nand_bbt.c                    |  32 +++---
 drivers/mtd/nand/nand_bch.c                    |   4 +-
 drivers/mtd/nand/nand_ecc.c                    |   4 +-
 drivers/mtd/nand/nandsim.c                     |  34 +++---
 drivers/mtd/nand/ndfc.c                        |  52 ++++-----
 drivers/mtd/nand/nuc900_nand.c                 |  23 ++--
 drivers/mtd/nand/omap2.c                       | 107 ++++++++++--------
 drivers/mtd/nand/orion_nand.c                  |  13 +--
 drivers/mtd/nand/pasemi_nand.c                 |  21 ++--
 drivers/mtd/nand/plat_nand.c                   |  16 +--
 drivers/mtd/nand/pxa3xx_nand.c                 |  66 ++++++-----
 drivers/mtd/nand/r852.c                        |  41 +++----
 drivers/mtd/nand/r852.h                        |   1 -
 drivers/mtd/nand/s3c2410.c                     |  29 ++---
 drivers/mtd/nand/sh_flctl.c                    |   9 +-
 drivers/mtd/nand/sharpsl.c                     |  20 ++--
 drivers/mtd/nand/sm_common.c                   |   2 +-
 drivers/mtd/nand/socrates_nand.c               |  24 ++--
 drivers/mtd/nand/sunxi_nand.c                  |  40 +++----
 drivers/mtd/nand/tmio_nand.c                   |  10 +-
 drivers/mtd/nand/txx9ndfmc.c                   |  25 ++---
 drivers/mtd/nand/vf610_nfc.c                   |   6 +-
 drivers/mtd/nand/xway_nand.c                   |   4 +-
 drivers/staging/mt29f_spinand/mt29f_spinand.c  |  19 ++--
 include/linux/mtd/nand.h                       |  29 ++++-
 include/linux/mtd/sh_flctl.h                   |   3 +-
 77 files changed, 1067 insertions(+), 1077 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2015-11-19 19:22 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-16 13:37 [PATCH 00/27] mtd: nand: refactor the NAND subsystem (part 1) Boris Brezillon
2015-11-16 13:37 ` [PATCH 02/27] mtd: nand: add an mtd_to_nand() helper Boris Brezillon
     [not found]   ` <1447681080-31232-3-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2015-11-19 19:19     ` Brian Norris
2015-11-16 13:37 ` [PATCH 03/27] mtd: nand: update examples in the documentation to use mtd_to_nand() Boris Brezillon
2015-11-19 19:22   ` Brian Norris
2015-11-16 13:37 ` [PATCH 05/27] blackfin: nand: make use of mtd_to_nand() where appropriate Boris Brezillon
2015-11-16 13:37 ` [PATCH 06/27] cris: " Boris Brezillon
2015-11-16 13:37 ` [PATCH 07/27] mips: " Boris Brezillon
2015-11-16 13:37 ` [PATCH 09/27] mtd: nand: make use of mtd_to_nand() in NAND core code Boris Brezillon
2015-11-16 13:37 ` [PATCH 10/27] mtd: nand: make use of mtd_to_nand() in NAND drivers Boris Brezillon
2015-11-16 13:37 ` [PATCH 13/27] mtd: nand: add nand_to_mtd() helper Boris Brezillon
2015-11-16 13:37 ` [PATCH 17/27] cris: nand: use the mtd instance embedded in struct nand_chip Boris Brezillon
2015-11-16 13:37 ` [PATCH 18/27] mtd: nand: update mtd_to_nand() Boris Brezillon
2015-11-17  3:03   ` Brian Norris
     [not found]     ` <20151117030353.GZ8456-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2015-11-17  8:26       ` Boris Brezillon
2015-11-16 13:37 ` [PATCH 22/27] mtd: nand: simplify nand_dt_init() usage Boris Brezillon
     [not found] ` <1447681080-31232-1-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2015-11-16 13:37   ` [PATCH 01/27] mtd: nand: fix drivers abusing mtd->priv Boris Brezillon
2015-11-19 19:07     ` Brian Norris
2015-11-16 13:37   ` [PATCH 04/27] ARM: nand: make use of mtd_to_nand() where appropriate Boris Brezillon
2015-11-16 13:37   ` [PATCH 08/27] sh: " Boris Brezillon
2015-11-16 13:37   ` [PATCH 11/27] staging: mt29f_spinand: make use of mtd_to_nand() Boris Brezillon
2015-11-16 13:37   ` [PATCH 12/27] mtd: nand: embed an mtd_info structure into nand_chip Boris Brezillon
2015-11-16 13:37   ` [PATCH 14/27] mtd: nand: use the mtd instance embedded in struct nand_chip Boris Brezillon
     [not found]     ` <1447681080-31232-15-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2015-11-17  3:00       ` Brian Norris
     [not found]         ` <20151117030019.GY8456-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2015-11-17  8:38           ` Boris Brezillon
2015-11-17  9:05             ` Julia Lawall
2015-11-17 14:22               ` Boris Brezillon
2015-11-17 15:32                 ` Julia Lawall
2015-11-16 13:37   ` [PATCH 15/27] mtd: nand: update the documentation to reflect framework changes Boris Brezillon
2015-11-16 13:37   ` [PATCH 16/27] staging: mt29f_spinand: use the mtd instance embedded in struct nand_chip Boris Brezillon
2015-11-16 13:37   ` [PATCH 19/27] mtd: nand: remove useless mtd->priv = chip assignments Boris Brezillon
2015-11-16 13:37   ` [PATCH 20/27] cris: " Boris Brezillon
2015-11-16 13:37   ` [PATCH 21/27] staging: mt29f_spinand: remove useless mtd->priv = chip assignment Boris Brezillon
2015-11-16 13:37   ` [PATCH 23/27] mtd: nand: kill the chip->flash_node field Boris Brezillon
2015-11-16 13:37   ` [PATCH 24/27] mtd: nand: add helpers to access ->priv Boris Brezillon
2015-11-16 13:37   ` [PATCH 26/27] mtd: nand: make use of nand_set/get_controller_data() helpers Boris Brezillon
2015-11-16 13:38   ` [PATCH 27/27] staging: mt29f_spinand: " Boris Brezillon
2015-11-16 13:37 ` [PATCH 25/27] ARM: " Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).