public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 00/15] mtd: rawnand: 3rd batch of cleanup
@ 2018-10-23 18:49 Boris Brezillon
  2018-10-23 18:49 ` [PATCH 01/15] mtd: rawnand: Stop passing mtd_info objects to internal functions Boris Brezillon
                   ` (15 more replies)
  0 siblings, 16 replies; 23+ messages in thread
From: Boris Brezillon @ 2018-10-23 18:49 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, Miquel Raynal, linux-mtd
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Han Xu,
	Masahiro Yamada, Tudor Ambarus, Harvey Hunt, Xiaolei Li,
	Maxim Levitsky, Marc Gonzalez, Stefan Agner

Hello,

After the sanitization of the raw NAND API, here is a smaller
patchset continuing in this direction.

Patch 1 is just a follow-up on the "stop passing mtd_info objects
around" patches, except this times it takes care of internal functions.
There's still a lot of sanitization to do in drivers in order to get
rid of those mtd params, but I'll leave that to driver maintainers.

Patch 2 is trying to get rid of 3 forward declarations that are not
really needed.

Patch 3 is getting rid of useless test in nand_legacy_set_defaults().

Patch 4 is making nand_exec_op() private, so that NAND controller
drivers are not tempted to use it.

Patch 5 is getting rid of an unused flag that has been around for quite
some time.

Patches 6 to 13 are deprecating the ->select_chip() hook, which should
now be replaced by internal target/die selection logic directly called
from the ->exec_op() and ecc.read/write_xxx() implementations. The
rational behind this change is that modern controller now take care of
asserting/deasserting the CS pin on a per-operation basis, and if we
ever want to implement advanced queuing logic (instead of the basic
serialization we currently have) we'll have to attach a CS line to the
operation we want to execute.

Finally, patches 14 and 15 are moving the controller specific methods
to nand_controller_ops.

As usual, let me know what you think of those changes.

Regards,

Boris

Boris Brezillon (15):
  mtd: rawnand: Stop passing mtd_info objects to internal functions
  mtd: rawnand: Reorganize code to avoid forward declarations
  mtd: rawnand: legacy: Drop useless test in nand_legacy_set_defaults()
  mtd: rawnand: Move nand_exec_op() to internal.h
  mtd: rawnand: Remove unused NAND_CONTROLLER_ALLOC flag
  mtd: rawnand: Add nand_[de]select_target() helpers
  mtd: rawnand: Pass the CS line to be selected in struct nand_operation
  mtd: rawnand: Make ->select_chip() optional when ->exec_op() is
    implemented
  mtd: rawnand: fsmc: Stop implementing ->select_chip()
  mtd: rawnand: marvell: Stop implementing ->select_chip()
  mtd: rawnand: tegra: Stop implementing ->select_chip()
  mtd: rawnand: vf610: Stop implementing ->select_chip()
  mtd: rawnand: Deprecate the ->select_chip() hook
  mtd: rawnand: Move the ->exec_op() method to nand_controller_ops
  mtd: rawnand: Move ->setup_data_interface() to nand_controller_ops

 drivers/mtd/nand/raw/atmel/nand-controller.c  |   9 +-
 drivers/mtd/nand/raw/au1550nd.c               |   2 +-
 .../mtd/nand/raw/bcm47xxnflash/ops_bcm4706.c  |   2 +-
 drivers/mtd/nand/raw/cafe_nand.c              |   2 +-
 drivers/mtd/nand/raw/davinci_nand.c           |   2 +-
 drivers/mtd/nand/raw/denali.c                 |   5 +-
 drivers/mtd/nand/raw/diskonchip.c             |   4 +-
 drivers/mtd/nand/raw/fsl_elbc_nand.c          |   2 +-
 drivers/mtd/nand/raw/fsl_ifc_nand.c           |   2 +-
 drivers/mtd/nand/raw/fsl_upm.c                |   2 +-
 drivers/mtd/nand/raw/fsmc_nand.c              |  32 +-
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c    |  27 +-
 drivers/mtd/nand/raw/hisi504_nand.c           |   2 +-
 drivers/mtd/nand/raw/internals.h              |  33 +
 drivers/mtd/nand/raw/jz4740_nand.c            |   6 +-
 drivers/mtd/nand/raw/jz4780_nand.c            |   2 +-
 drivers/mtd/nand/raw/marvell_nand.c           |  32 +-
 drivers/mtd/nand/raw/mpc5121_nfc.c            |   4 +-
 drivers/mtd/nand/raw/mtk_nand.c               |   4 +-
 drivers/mtd/nand/raw/mxc_nand.c               |  14 +-
 drivers/mtd/nand/raw/nand_base.c              | 699 +++++++++---------
 drivers/mtd/nand/raw/nand_bbt.c               | 283 +++----
 drivers/mtd/nand/raw/nand_hynix.c             |   8 +-
 drivers/mtd/nand/raw/nand_legacy.c            |  25 +-
 drivers/mtd/nand/raw/ndfc.c                   |   2 +-
 drivers/mtd/nand/raw/plat_nand.c              |   2 +-
 drivers/mtd/nand/raw/qcom_nandc.c             |   2 +-
 drivers/mtd/nand/raw/r852.c                   |   4 +-
 drivers/mtd/nand/raw/s3c2410.c                |   7 +-
 drivers/mtd/nand/raw/sh_flctl.c               |   2 +-
 drivers/mtd/nand/raw/sunxi_nand.c             |   4 +-
 drivers/mtd/nand/raw/tango_nand.c             |   4 +-
 drivers/mtd/nand/raw/tegra_nand.c             |  32 +-
 drivers/mtd/nand/raw/vf610_nfc.c              |  38 +-
 drivers/mtd/nand/raw/xway_nand.c              |   2 +-
 drivers/staging/mt29f_spinand/mt29f_spinand.c |   2 +-
 include/linux/mtd/rawnand.h                   | 149 ++--
 37 files changed, 779 insertions(+), 674 deletions(-)

-- 
2.17.1

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

end of thread, other threads:[~2018-11-06 13:08 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-23 18:49 [PATCH 00/15] mtd: rawnand: 3rd batch of cleanup Boris Brezillon
2018-10-23 18:49 ` [PATCH 01/15] mtd: rawnand: Stop passing mtd_info objects to internal functions Boris Brezillon
2018-10-23 18:49 ` [PATCH 02/15] mtd: rawnand: Reorganize code to avoid forward declarations Boris Brezillon
2018-10-23 18:49 ` [PATCH 03/15] mtd: rawnand: legacy: Drop useless test in nand_legacy_set_defaults() Boris Brezillon
2018-10-23 18:50 ` [PATCH 04/15] mtd: rawnand: Move nand_exec_op() to internal.h Boris Brezillon
2018-10-23 18:50 ` [PATCH 05/15] mtd: rawnand: Remove unused NAND_CONTROLLER_ALLOC flag Boris Brezillon
2018-10-23 18:50 ` [PATCH 06/15] mtd: rawnand: Add nand_[de]select_target() helpers Boris Brezillon
2018-10-29 13:36   ` Miquel Raynal
2018-10-29 13:39     ` Miquel Raynal
2018-10-29 13:57       ` Boris Brezillon
2018-10-29 14:06         ` Miquel Raynal
2018-10-29 14:16           ` Boris Brezillon
2018-10-29 14:25             ` Miquel Raynal
2018-10-23 18:50 ` [PATCH 07/15] mtd: rawnand: Pass the CS line to be selected in struct nand_operation Boris Brezillon
2018-10-23 18:50 ` [PATCH 08/15] mtd: rawnand: Make ->select_chip() optional when ->exec_op() is implemented Boris Brezillon
2018-10-23 18:50 ` [PATCH 09/15] mtd: rawnand: fsmc: Stop implementing ->select_chip() Boris Brezillon
2018-10-23 18:50 ` [PATCH 10/15] mtd: rawnand: marvell: " Boris Brezillon
2018-10-23 18:50 ` [PATCH 11/15] mtd: rawnand: tegra: " Boris Brezillon
2018-10-23 18:50 ` [PATCH 12/15] mtd: rawnand: vf610: " Boris Brezillon
2018-10-23 18:50 ` [PATCH 13/15] mtd: rawnand: Deprecate the ->select_chip() hook Boris Brezillon
2018-10-23 18:50 ` [PATCH 14/15] mtd: rawnand: Move the ->exec_op() method to nand_controller_ops Boris Brezillon
2018-10-23 18:50 ` [PATCH 15/15] mtd: rawnand: Move ->setup_data_interface() " Boris Brezillon
2018-11-06 13:08 ` [PATCH 00/15] mtd: rawnand: 3rd batch of cleanup Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox