All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: linux-mtd@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de
Subject: Re: [PATCH 4/9] mtd: nand: Add function to convert ONFI mode to data_interface
Date: Mon, 12 Sep 2016 08:35:11 +0200	[thread overview]
Message-ID: <20160912063511.flb3se54dy4itlru@pengutronix.de> (raw)
In-Reply-To: <20160909143522.6a3b6975@bbrezillon>

On Fri, Sep 09, 2016 at 02:35:22PM +0200, Boris Brezillon wrote:
> On Fri,  9 Sep 2016 14:05:07 +0200
> Sascha Hauer <s.hauer@pengutronix.de> wrote:
> 
> > onfi_init_data_interface() initializes a data interface with
> > values from a given ONFI mode.
> > 
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >  drivers/mtd/nand/nand_timings.c | 16 ++++++++++++++++
> >  include/linux/mtd/nand.h        |  2 ++
> >  2 files changed, 18 insertions(+)
> > 
> > diff --git a/drivers/mtd/nand/nand_timings.c b/drivers/mtd/nand/nand_timings.c
> > index 9af2ebc..ece4ff2 100644
> > --- a/drivers/mtd/nand/nand_timings.c
> > +++ b/drivers/mtd/nand/nand_timings.c
> > @@ -269,3 +269,19 @@ const struct nand_sdr_timings *onfi_async_timing_mode_to_sdr_timings(int mode)
> >  	return &onfi_sdr_timings[mode].timings.sdr;
> >  }
> >  EXPORT_SYMBOL(onfi_async_timing_mode_to_sdr_timings);
> > +
> > +/**
> > + * onfi_init_data_interface - [NAND Interface] Initialize a data interface from
> > + * given ONFI mode
> > + * @iface: The data interface to be initialized
> > + * @mode: The ONFI timing mode
> > + */
> > +int onfi_init_data_interface(struct nand_data_interface *iface, int mode)
> 
> Can we choose a more future proof prototype (like the one I suggested)
> for this function. Passing the nand_chip will later allow to extract
> extended timings (tR, tPROG, tCCS, ...) from the param page, and
> passing the interface type makes it compatible with DDR mode.

Ok, will change as you suggested to:

int onfi_init_data_interface(struct nand_chip *chip,
                             struct nand_data_interface *iface,
                             enum nand_data_interface_type type,
                             int timing_mode)

Before I send another round: Are the other patches ok?

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 |

WARNING: multiple messages have this Message-ID (diff)
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/9] mtd: nand: Add function to convert ONFI mode to data_interface
Date: Mon, 12 Sep 2016 08:35:11 +0200	[thread overview]
Message-ID: <20160912063511.flb3se54dy4itlru@pengutronix.de> (raw)
In-Reply-To: <20160909143522.6a3b6975@bbrezillon>

On Fri, Sep 09, 2016 at 02:35:22PM +0200, Boris Brezillon wrote:
> On Fri,  9 Sep 2016 14:05:07 +0200
> Sascha Hauer <s.hauer@pengutronix.de> wrote:
> 
> > onfi_init_data_interface() initializes a data interface with
> > values from a given ONFI mode.
> > 
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >  drivers/mtd/nand/nand_timings.c | 16 ++++++++++++++++
> >  include/linux/mtd/nand.h        |  2 ++
> >  2 files changed, 18 insertions(+)
> > 
> > diff --git a/drivers/mtd/nand/nand_timings.c b/drivers/mtd/nand/nand_timings.c
> > index 9af2ebc..ece4ff2 100644
> > --- a/drivers/mtd/nand/nand_timings.c
> > +++ b/drivers/mtd/nand/nand_timings.c
> > @@ -269,3 +269,19 @@ const struct nand_sdr_timings *onfi_async_timing_mode_to_sdr_timings(int mode)
> >  	return &onfi_sdr_timings[mode].timings.sdr;
> >  }
> >  EXPORT_SYMBOL(onfi_async_timing_mode_to_sdr_timings);
> > +
> > +/**
> > + * onfi_init_data_interface - [NAND Interface] Initialize a data interface from
> > + * given ONFI mode
> > + * @iface: The data interface to be initialized
> > + * @mode: The ONFI timing mode
> > + */
> > +int onfi_init_data_interface(struct nand_data_interface *iface, int mode)
> 
> Can we choose a more future proof prototype (like the one I suggested)
> for this function. Passing the nand_chip will later allow to extract
> extended timings (tR, tPROG, tCCS, ...) from the param page, and
> passing the interface type makes it compatible with DDR mode.

Ok, will change as you suggested to:

int onfi_init_data_interface(struct nand_chip *chip,
                             struct nand_data_interface *iface,
                             enum nand_data_interface_type type,
                             int timing_mode)

Before I send another round: Are the other patches ok?

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 |

  reply	other threads:[~2016-09-12  6:35 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09 12:05 [PATCH v4] mtd: nand: automate NAND timings selection Sascha Hauer
2016-09-09 12:05 ` Sascha Hauer
2016-09-09 12:05 ` [PATCH 1/9] mtd: nand: Create a NAND reset function Sascha Hauer
2016-09-09 12:05   ` Sascha Hauer
2016-09-09 12:15   ` Fabio Estevam
2016-09-09 12:15     ` Fabio Estevam
2016-09-09 12:26     ` Boris Brezillon
2016-09-09 12:26       ` Boris Brezillon
2016-09-09 19:24       ` Uwe Kleine-König
2016-09-09 19:24         ` Uwe Kleine-König
2016-09-09 12:05 ` [PATCH 2/9] mtd: nand: Introduce nand_data_interface Sascha Hauer
2016-09-09 12:05   ` Sascha Hauer
2016-09-09 12:05 ` [PATCH 3/9] mtd: nand: convert ONFI mode into data interface Sascha Hauer
2016-09-09 12:05   ` Sascha Hauer
2016-09-09 12:05 ` [PATCH 4/9] mtd: nand: Add function to convert ONFI mode to data_interface Sascha Hauer
2016-09-09 12:05   ` Sascha Hauer
2016-09-09 12:35   ` Boris Brezillon
2016-09-09 12:35     ` Boris Brezillon
2016-09-12  6:35     ` Sascha Hauer [this message]
2016-09-12  6:35       ` Sascha Hauer
2016-09-12 18:18       ` Boris Brezillon
2016-09-12 18:18         ` Boris Brezillon
2016-09-09 12:05 ` [PATCH 5/9] mtd: nand: Expose data interface for ONFI mode 0 Sascha Hauer
2016-09-09 12:05   ` Sascha Hauer
2016-09-09 12:05 ` [PATCH 6/9] mtd: nand: automate NAND timings selection Sascha Hauer
2016-09-09 12:05   ` Sascha Hauer
2016-09-09 12:05 ` [PATCH 7/9] mtd: nand: sunxi: switch from manual to automated timing config Sascha Hauer
2016-09-09 12:05   ` Sascha Hauer
2016-09-09 12:05 ` [PATCH 8/9] mtd: nand: mxc: implement onfi get/set features Sascha Hauer
2016-09-09 12:05   ` Sascha Hauer
2016-09-09 12:05 ` [PATCH 9/9] mtd: nand: mxc: Add timing setup for v2 controllers Sascha Hauer
2016-09-09 12:05   ` Sascha Hauer
2016-09-15  8:32 [PATCH v4] mtd: nand: automate NAND timings selection Sascha Hauer
2016-09-15  8:32 ` [PATCH 4/9] mtd: nand: Add function to convert ONFI mode to data_interface Sascha Hauer
2016-09-15  8:32   ` Sascha Hauer

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=20160912063511.flb3se54dy4itlru@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=boris.brezillon@free-electrons.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mtd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.