From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/7] mtd: nand: automate NAND timings selection
Date: Thu, 8 Sep 2016 09:55:30 +0200 [thread overview]
Message-ID: <20160908075530.e4o2gecxxlmedtlx@pengutronix.de> (raw)
In-Reply-To: <20160907175917.2a4791d3@bbrezillon>
On Wed, Sep 07, 2016 at 05:59:17PM +0200, Boris Brezillon wrote:
> On Wed, 7 Sep 2016 16:59:51 +0200
> Boris Brezillon <boris.brezillon@free-electrons.com> wrote:
>
> > On Wed, 7 Sep 2016 16:36:15 +0200
> > Sascha Hauer <s.hauer@pengutronix.de> wrote:
> >
> > > Ok, I think now we are understanding each other. So I keep two timing
> > > instances in struct nand_chip, one for initialization and one optimized
> > > timing. They both get initialized once during chip detection and can be
> > > reused when needed.
> >
> > Hm, not sure we need to keep 2 instances around, all we need to save is
> > the 'best_onfi_timing_mode', or we can just update
> > ->default_onfi_timing_mode based on the result of the timing mode
> > detection, so that, when nand_setup_data_interface() is called, all we
> > have to do is:
> >
> > conf = chip->data_iface_conf;
> > conf->type = NAND_SDR_IFACE,
> > conf->timings.sdr = *onfi_async_timing_mode_to_sdr_timings(chip->default_onfi_timing_mode);
> > chip->setup_data_interface(mtd, conf, false);
> >
>
> After the discussion we had on IRC, I want to reconsider what I said.
> How about having a global nand_default_data_iface_config that would
> work will all chips (probably exposing mode 0 timings and an SDR
> interface).
> This one will be used even for DDR NANDs, because after a reset they
> return back to SDR mode, timing mode 0.
>
> Now, I keep thinking that other timing modes should not be directly
> exposed.
sounds good. How do you think the default iface_config should be
exposed? Should I turn the onfi_sdr_timings array to struct
nand_data_interface like done before and add a accessor function for the
first element, something like:
const struct nand_data_interface *nand_default_data_interface(void);
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2016-09-08 7:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 12:21 [PATCH v3] mtd: nand: automate NAND timings selection Sascha Hauer
2016-09-07 12:21 ` [PATCH 1/7] mtd: nand: Create a NAND reset function Sascha Hauer
2016-09-07 12:31 ` Boris Brezillon
2016-09-07 12:21 ` [PATCH 2/7] mtd: nand: Introduce nand_data_interface Sascha Hauer
2016-09-07 12:21 ` [PATCH 3/7] mtd: nand: automate NAND timings selection Sascha Hauer
2016-09-07 13:41 ` Boris Brezillon
2016-09-07 14:36 ` Sascha Hauer
2016-09-07 14:59 ` Boris Brezillon
2016-09-07 15:59 ` Boris Brezillon
2016-09-08 7:55 ` Sascha Hauer [this message]
2016-09-08 8:12 ` Boris Brezillon
2016-09-07 12:21 ` [PATCH 4/7] mtd: nand: sunxi: switch from manual to automated timing config Sascha Hauer
2016-09-07 12:21 ` [PATCH 5/7] mtd: nand: mxc: implement onfi get/set features Sascha Hauer
2016-09-07 12:21 ` [PATCH 6/7] mtd: nand: mxc: Add timing setup for v2 controllers Sascha Hauer
2016-09-07 12:21 ` [PATCH 7/7] mtd: nand: remove unnecessary 'extern' from function declarations Sascha Hauer
2016-09-07 19:29 ` Boris Brezillon
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=20160908075530.e4o2gecxxlmedtlx@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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).