public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH RESEND v2 0/2] Migrate the GPMI driver to use NAND core timings
@ 2018-03-02 14:38 Miquel Raynal
  2018-03-02 14:38 ` [PATCH RESEND v2 1/2] mtd: rawnand: gpmi: support ->setup_data_interface() Miquel Raynal
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Miquel Raynal @ 2018-03-02 14:38 UTC (permalink / raw)
  To: Boris Brezillon, Richard Weinberger, David Woodhouse,
	Brian Norris, Marek Vasut, Cyrille Pitchen, Han Xu
  Cc: linux-mtd, juliensu, jocelyncarroue, Miquel Raynal

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 sent changes in the
GPMI timings section, this was raised to me as a no go. Since then, I
sent a series improving timings handling in the core, see [1] and [2],
so this kind of change that moves the shared logic in the core can be
applied safely.

[1] http://lists.infradead.org/pipermail/linux-mtd/2018-March/079456.html
[2] http://lists.infradead.org/pipermail/linux-mtd/2018-March/079460.html

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.


Miquel Raynal (2):
  mtd: rawnand: gpmi: support ->setup_data_interface()
  mtd: rawnand: gpmi: use core timings instead of an empirical
    derivation

 drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c  | 811 +++++------------------------
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c |  82 ++-
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h | 131 +----
 drivers/mtd/nand/raw/gpmi-nand/gpmi-regs.h |   5 +
 4 files changed, 185 insertions(+), 844 deletions(-)

-- 
2.14.1

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

end of thread, other threads:[~2018-03-21  9:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-02 14:38 [PATCH RESEND v2 0/2] Migrate the GPMI driver to use NAND core timings Miquel Raynal
2018-03-02 14:38 ` [PATCH RESEND v2 1/2] mtd: rawnand: gpmi: support ->setup_data_interface() Miquel Raynal
2018-03-02 14:38 ` [PATCH RESEND v2 2/2] mtd: rawnand: gpmi: use core timings instead of an empirical derivation Miquel Raynal
2018-03-21  9:52 ` [PATCH RESEND v2 0/2] Migrate the GPMI driver to use NAND core timings Boris Brezillon

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