[PATCH v3 0/2] Migrate the GPMI driver to use NAND core timings
Miquel Raynal
miquel.raynal at bootlin.com
Mon Feb 12 02:06:09 PST 2018
Hello Han,
Would you mind give us your input about this series as well as the
patch that follows (Use core timings instead of an empirical
derivation) ?
If you are unhappy with them I will welcome your comments.
Thank you,
Miquèl
On Fri, 19 Jan 2018 14:58:53 +0100, Miquel Raynal
<miquel.raynal at free-electrons.com> wrote:
> Hello,
>
> The GPMI NAND controller driver has its own timings logic while the core
> also has its own that should be preferred to avoid code duplication.
> This series migrates the driver to use the ->setup_data_interface()
> hook, preferred way to handle timings negotiation between controllers
> and NAND chips.
>
> This driver has stronger requirements in terms of respect of the ONFI
> specification than the core has, and last time I post changes to this
> section this was raised to me. Hence, the first patch effectively
> applies the same requirements to the core. Doing this can slow down
> several chips that do not follow entirely the specifications, but
> another series is coming to add the possibility for NAND vendors to
> flag certain features as "unsupported". See
>
> "mtd: nand: Check ONFI timings have been acked by the chip"
>
> commit log for more details.
>
> Thank you,
> Miquèl
>
>
> Changes since v2:
> =================
> - Fix ->select_chip(): chipnr == 0 is valid.
> - Fix ->select_chip(): hw.must_apply_timings must be reset after a
> ->setup_data_interface().
>
> Changes since v1:
> =================
> - Removed inline on non-static gpmi_enable/disable_clk() functions.
> - Rewording some lines of the patch.
> - Use tREA_max value provided by the core instead of a locally defined
> value.
> - Check ->conf in gpmi_setup_data_interface() instead of
> ->onfi_timing_mode_default (use tRC).
> - Removed useless copy of hw.timing_mode.
> - Moved gpmi_nfc_apply_timings() to ->select_chip().
> - Canceled the useless move of one structure.
>
> One comment is not addressed here: using one register for TIMING0/1 and
> CTRL1 that is only written in ->apply_timings(). This will be done in a
> later patch that will update the way timings are derived.
>
>
> Miquel Raynal (2):
> mtd: nand: Check ONFI timings have been acked by the chip
> mtd: nand: gpmi: Support ->setup_data_interface()
>
> drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 277 ++++++++++-----------------------
> drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 42 +++--
> drivers/mtd/nand/gpmi-nand/gpmi-nand.h | 82 +++++-----
> drivers/mtd/nand/nand_base.c | 42 ++++-
> 4 files changed, 185 insertions(+), 258 deletions(-)
>
--
Miquel Raynal, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
More information about the linux-mtd
mailing list