linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/13] Supporting restricted NAND controllers
@ 2020-05-04  9:52 Miquel Raynal
  2020-05-04  9:52 ` [PATCH v4 01/13] mtd: rawnand: Translate obscure bitfields into readable macros Miquel Raynal
                   ` (12 more replies)
  0 siblings, 13 replies; 18+ messages in thread
From: Miquel Raynal @ 2020-05-04  9:52 UTC (permalink / raw)
  To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, linux-mtd
  Cc: Michal Simek, Boris Brezillon, Naga Sureshkumar Relli,
	Thomas Petazzoni, Miquel Raynal

Hello,

The first 6 patches are just miscellaneous changes, that do not bring
functional changes but clarify a few core areas.

Patches 7 to 10 change the NAND operations used to read ONFI/JEDEC
parameter pages. I expect all controllers to support it now.

Patch 11 add new nand_monolithic_read/write_page_raw() helpers, that
could be used by drivers which are "constrained".

Finally, patches 12 and 13 soften the rules so that the hooks linked
to the above helpers are not overwritten by the core or NAND chip
drivers.

This series is needed in order to support controllers like Arasan's.

Thanks,
Miquèl

Changes in v4:
* Collected Reviewed-by tags.
* Changed the xxx() == 0 conditions into !xxx()
* Removed the use of pbuf in the JEDEC driver, keep using p only
* Dropped the extra sentence in the kernel doc of monolithic helpers

Changes in v3:
* s/NAND_USE_DMA_BUFFER/NAND_USES_DMA/ as suggested by Boris.
* Collected Reviewed-by tags.
* Enhance the kernel doc of the monolithic helpers.
* Added a nand_check_supported_op() helper.
* Add a check_only argument to the nand_read_data_op() helper so that
  we can check if it is supported by the controller driver (this uses
  the nand_check_supported_op() helper).
* Enhance the ONFI/JEDEC parameter page discoveries: in case the
  driver does not support ->exec_op(), we still use the same behavior
  as before (reading data bytes only), otherwise we check if reading
  data bytes is supported or not. If it is not, then we fallback to a
  CHANGE READ COLUMN operation.

Changes in v2:
* Fixed the two wrong conversions of flag values from 8-bit digits
  into BIT() macros.
* Dropped "Help supporting controllers that are not able to split
  operations". Instead, decided on the fly for the read_param_page()
  uses (ONFI and JEDEC discovery) and wrote separate helpers for
  read/write_page_raw() (the Arasan driver will use them).
* Prevent the core and NAND chip drivers to overload the
  ecc->read/write_page_raw() hooks.
* Added Reviewed-by tags.

Miquel Raynal (13):
  mtd: rawnand: Translate obscure bitfields into readable macros
  mtd: rawnand: Reorder the nand_chip->options flags
  mtd: rawnand: Rename a NAND chip option
  mtd: rawnand: Fix comments about the use of bufpoi
  mtd: rawnand: Rename the use_bufpoi variables
  mtd: rawnand: Avoid indirect access to ->data_buf()
  mtd: rawnand: Add a helper to check supported operations
  mtd: rawnand: Give the possibility to verify a read operation is
    supported
  mtd: rawnand: onfi: Adapt the parameter page read to constraint
    controllers
  mtd: rawnand: jedec: Adapt the parameter page read to constraint
    controllers
  mtd: rawnand: Expose monolithic read/write_page_raw() helpers
  mtd: rawnand: Allow controllers to overload soft ECC hooks
  mtd: rawnand: micron: Allow controllers to overload raw accessors

 drivers/mtd/nand/raw/atmel/nand-controller.c |   2 +-
 drivers/mtd/nand/raw/brcmnand/brcmnand.c     |   2 +-
 drivers/mtd/nand/raw/denali.c                |   2 +-
 drivers/mtd/nand/raw/fsmc_nand.c             |   2 +-
 drivers/mtd/nand/raw/internals.h             |   9 +
 drivers/mtd/nand/raw/marvell_nand.c          |   4 +-
 drivers/mtd/nand/raw/meson_nand.c            |   2 +-
 drivers/mtd/nand/raw/mtk_nand.c              |   2 +-
 drivers/mtd/nand/raw/nand_base.c             | 187 ++++++++++++++-----
 drivers/mtd/nand/raw/nand_jedec.c            |  19 +-
 drivers/mtd/nand/raw/nand_legacy.c           |   8 +-
 drivers/mtd/nand/raw/nand_micron.c           |  12 +-
 drivers/mtd/nand/raw/nand_onfi.c             |  20 +-
 drivers/mtd/nand/raw/qcom_nandc.c            |   2 +-
 drivers/mtd/nand/raw/stm32_fmc2_nand.c       |   2 +-
 drivers/mtd/nand/raw/sunxi_nand.c            |   2 +-
 drivers/mtd/nand/raw/tango_nand.c            |   2 +-
 drivers/mtd/nand/raw/tegra_nand.c            |   2 +-
 include/linux/mtd/rawnand.h                  |  99 +++++-----
 19 files changed, 256 insertions(+), 124 deletions(-)

-- 
2.20.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

end of thread, other threads:[~2020-05-04 10:39 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-04  9:52 [PATCH v4 00/13] Supporting restricted NAND controllers Miquel Raynal
2020-05-04  9:52 ` [PATCH v4 01/13] mtd: rawnand: Translate obscure bitfields into readable macros Miquel Raynal
2020-05-04  9:52 ` [PATCH v4 02/13] mtd: rawnand: Reorder the nand_chip->options flags Miquel Raynal
2020-05-04  9:52 ` [PATCH v4 03/13] mtd: rawnand: Rename a NAND chip option Miquel Raynal
2020-05-04  9:52 ` [PATCH v4 04/13] mtd: rawnand: Fix comments about the use of bufpoi Miquel Raynal
2020-05-04  9:52 ` [PATCH v4 05/13] mtd: rawnand: Rename the use_bufpoi variables Miquel Raynal
2020-05-04  9:52 ` [PATCH v4 06/13] mtd: rawnand: Avoid indirect access to ->data_buf() Miquel Raynal
2020-05-04  9:52 ` [PATCH v4 07/13] mtd: rawnand: Add a helper to check supported operations Miquel Raynal
2020-05-04 10:37   ` Boris Brezillon
2020-05-04  9:52 ` [PATCH v4 08/13] mtd: rawnand: Give the possibility to verify a read operation is supported Miquel Raynal
2020-05-04  9:52 ` [PATCH v4 09/13] mtd: rawnand: onfi: Adapt the parameter page read to constraint controllers Miquel Raynal
2020-05-04  9:52 ` [PATCH v4 10/13] mtd: rawnand: jedec: " Miquel Raynal
2020-05-04  9:52 ` [PATCH v4 11/13] mtd: rawnand: Expose monolithic read/write_page_raw() helpers Miquel Raynal
2020-05-04 10:35   ` Boris Brezillon
2020-05-04 10:37     ` Miquel Raynal
2020-05-04 10:39       ` Boris Brezillon
2020-05-04  9:52 ` [PATCH v4 12/13] mtd: rawnand: Allow controllers to overload soft ECC hooks Miquel Raynal
2020-05-04  9:52 ` [PATCH v4 13/13] mtd: rawnand: micron: Allow controllers to overload raw accessors Miquel Raynal

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).