From: Brian Norris <computersforpeace@gmail.com>
To: Huang Shijie <b32955@freescale.com>
Cc: dedekind1@gmail.com, linux-mtd@lists.infradead.org, pekon@ti.com,
Florian Fainelli <ffainelli@freebox.fr>,
dwmw2@infradead.org,
Brian Foster <brian.foster@maximintegrated.com>
Subject: Re: [PATCH v4 4/6] mtd: set ONFI nand's default hooks in nand_set_defaults()
Date: Sat, 17 Aug 2013 10:55:07 -0700 [thread overview]
Message-ID: <20130817175507.GA5034@norris.computersforpeace.net> (raw)
In-Reply-To: <1376619009-8622-5-git-send-email-b32955@freescale.com>
On Fri, Aug 16, 2013 at 10:10:07AM +0800, Huang Shijie wrote:
> We may do some ONFI get/set features operations before we call the
> nand_scan_tail().
>
> So move the default ONFI nand hooks into nand_set_defaults().
>
> Signed-off-by: Huang Shijie <b32955@freescale.com>
This patch looks similar to a one forwarded by Brian Foster/Florian
Fainelli a while back. But since I don't have a good copy of the other
one, I'll take this.
(BTW, this patch is new for the v4 series, but I don't mind this time)
> ---
> drivers/mtd/nand/nand_base.c | 12 ++++++------
> 1 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index fa35699..61a7d14 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -2794,6 +2794,12 @@ static void nand_set_defaults(struct nand_chip *chip, int busw)
> if (!chip->select_chip)
> chip->select_chip = nand_select_chip;
>
> + /* set for ONFI nand */
> + if (!chip->onfi_set_features)
> + chip->onfi_set_features = nand_onfi_set_features;
> + if (!chip->onfi_get_features)
> + chip->onfi_get_features = nand_onfi_get_features;
> +
> /* If called twice, pointers that depend on busw may need to be reset */
> if (!chip->read_byte || chip->read_byte == nand_read_byte)
> chip->read_byte = busw ? nand_read_byte16 : nand_read_byte;
> @@ -3560,12 +3566,6 @@ int nand_scan_tail(struct mtd_info *mtd)
> if (!chip->write_page)
> chip->write_page = nand_write_page;
>
> - /* set for ONFI nand */
> - if (!chip->onfi_set_features)
> - chip->onfi_set_features = nand_onfi_set_features;
> - if (!chip->onfi_get_features)
> - chip->onfi_get_features = nand_onfi_get_features;
> -
> /*
> * Check ECC mode, default to software if 3byte/512byte hardware ECC is
> * selected and we have 256 byte pagesize fallback to software ECC
Brian
next prev parent reply other threads:[~2013-08-17 17:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-16 2:10 [PATCH v4 0/6] Export the ECC step size to user applications Huang Shijie
2013-08-16 2:10 ` [PATCH v4 1/6] mtd: add a new field to mtd_info{} Huang Shijie
2013-08-16 2:10 ` [PATCH v4 2/6] mtd: add a new sys node to show the ecc step size Huang Shijie
2013-08-16 2:10 ` [PATCH v4 3/6] mtd: set the ecc step size for master/slave mtd_info Huang Shijie
2013-08-16 2:10 ` [PATCH v4 4/6] mtd: set ONFI nand's default hooks in nand_set_defaults() Huang Shijie
2013-08-17 17:55 ` Brian Norris [this message]
2013-08-19 8:06 ` Brian Foster
2013-08-20 0:41 ` Brian Norris
2013-08-20 7:09 ` Brian Foster
2013-08-16 2:10 ` [PATCH v4 5/6] mtd: gpmi: remove the nand_scan() Huang Shijie
2013-08-16 2:10 ` [PATCH v4 6/6] mtd: update the ABI document about the ecc step size Huang Shijie
2013-08-16 13:45 ` Artem Bityutskiy
2013-08-17 3:26 ` Huang Shijie
2013-08-17 18:14 ` Brian Norris
2013-08-18 14:29 ` Huang Shijie
2013-08-20 1:02 ` Brian Norris
2013-08-20 2:11 ` Huang Shijie
2013-08-17 18:35 ` [PATCH v4 0/6] Export the ECC step size to user applications Brian Norris
2013-08-18 14:48 ` Huang Shijie
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=20130817175507.GA5034@norris.computersforpeace.net \
--to=computersforpeace@gmail.com \
--cc=b32955@freescale.com \
--cc=brian.foster@maximintegrated.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=ffainelli@freebox.fr \
--cc=linux-mtd@lists.infradead.org \
--cc=pekon@ti.com \
/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.