[PATCH RESEND v2 0/2] Migrate the GPMI driver to use NAND core timings
Boris Brezillon
boris.brezillon at bootlin.com
Wed Mar 21 02:52:00 PDT 2018
On Fri, 2 Mar 2018 15:38:38 +0100
Miquel Raynal <miquel.raynal at bootlin.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 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.
Applied.
Thanks,
Boris
>
> [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(-)
>
--
Boris Brezillon, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the linux-mtd
mailing list