linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Tudor Ambarus <Tudor.Ambarus@microchip.com>,
	<linux-mtd@lists.infradead.org>
Cc: Michal Simek <monstr@monstr.eu>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Naga Sureshkumar Relli <nagasure@xilinx.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>
Subject: [PATCH v3 00/13] Supporting restricted NAND controllers
Date: Mon,  4 May 2020 10:24:01 +0200	[thread overview]
Message-ID: <20200504082414.7327-1-miquel.raynal@bootlin.com> (raw)

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 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             | 189 ++++++++++++++-----
 drivers/mtd/nand/raw/nand_jedec.c            |  34 ++--
 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, 267 insertions(+), 130 deletions(-)

-- 
2.20.1


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

             reply	other threads:[~2020-05-04  8:24 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04  8:24 Miquel Raynal [this message]
2020-05-04  8:24 ` [PATCH v3 01/13] mtd: rawnand: Translate obscure bitfields into readable macros Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 02/13] mtd: rawnand: Reorder the nand_chip->options flags Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 03/13] mtd: rawnand: Rename a NAND chip option Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 04/13] mtd: rawnand: Fix comments about the use of bufpoi Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 05/13] mtd: rawnand: Rename the use_bufpoi variables Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 06/13] mtd: rawnand: Avoid indirect access to ->data_buf() Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 07/13] mtd: rawnand: Add a helper to check supported operations Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 08/13] mtd: rawnand: Give the possibility to verify a read operation is supported Miquel Raynal
2020-05-04  8:42   ` Boris Brezillon
2020-05-04  8:24 ` [PATCH v3 09/13] mtd: rawnand: onfi: Adapt the parameter page read to constraint controllers Miquel Raynal
2020-05-04  8:47   ` Boris Brezillon
2020-05-04  9:01     ` Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 10/13] mtd: rawnand: jedec: " Miquel Raynal
2020-05-04  8:51   ` Boris Brezillon
2020-05-04  8:57     ` Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 11/13] mtd: rawnand: Expose monolithic read/write_page_raw() helpers Miquel Raynal
2020-05-04  8:54   ` Boris Brezillon
2020-05-04  8:24 ` [PATCH v3 12/13] mtd: rawnand: Allow controllers to overload soft ECC hooks Miquel Raynal
2020-05-04  8:24 ` [PATCH v3 13/13] mtd: rawnand: micron: Allow controllers to overload raw accessors Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200504082414.7327-1-miquel.raynal@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=Tudor.Ambarus@microchip.com \
    --cc=boris.brezillon@collabora.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=monstr@monstr.eu \
    --cc=nagasure@xilinx.com \
    --cc=richard@nod.at \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).