linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Huang Shijie <b32955@freescale.com>
To: "Gupta, Pekon" <pekon@ti.com>
Cc: "dwmw2@infradead.org" <dwmw2@infradead.org>,
	"computersforpeace@gmail.com" <computersforpeace@gmail.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH] mtd: gpmi: add gpmi_devdata{} to simplify the code
Date: Mon, 24 Mar 2014 10:28:05 +0800	[thread overview]
Message-ID: <20140324022803.GA11377@localhost> (raw)
In-Reply-To: <20980858CB6D3A4BAE95CA194937D5E73EAB4F02@DBDE04.ent.ti.com>

On Fri, Mar 21, 2014 at 11:15:21AM +0000, Gupta, Pekon wrote:
> >From: Huang Shijie [mailto:b32955@freescale.com]
> >于 2014年03月21日 18:29, Gupta, Pekon 写道:
> >> Ezequiel has got approval for 2 new generic MTD bindings (refer l2-mtd.git)
> >> 	commit 8dd49165ef5f46b5ad9ba296c559ccff315f9421
> >> 	mtd: nand: Add a devicetree binding for ECC strength and ECC step size
> >> So, I think<1>  can be replaced by "nand-ecc-strength".
> >>
> >>
> >"nand-ecc-strength" is add the ECC strength for the NAND, but my patch
> >is add
> >the maximum ECC strength the BCH controller can support.
> >
> >they are different things.
> >
> Ok then it's also tied to your IP / SoC revision right ?

yes.
> 
> >>> >
> >>> >    [2] add the gpmi_devdata_imx{23|28|6q} to replace the gpmi_ids.
> >>> >
> >> Can you use "compatible" string in DT for this ?
> >>
> >>
> >sorry, could you please give me an example?
> >
> >I do not know what's your meaning. :(
> >
> 
> Can you use something like this, instead of populating static for each chip.
> 
> if (of_device_is_compatible(of_node, "imx23") || of_device_is_compatible(child, "imx28")) {
> 	bch_max_ecc_strength = 20;
> 	max_chain_delay = 16;
> } elseif (of_device_is_compatible(of_node, "imx6q") {
> 	bch_max_ecc_strength = 40;
> 	max_chain_delay = 12;
> } elseif (of_device_is_compatible(of_node, "imx6sx") {
> 	bch_max_ecc_strength = 40;
> 	max_chain_delay = 0; /* whatever is here */
> } else {
> 	bch_max_ecc_strength = 1; /* whatever is default */
> 	max_chain_delay = 0; /* whatever is default */
> }
> 

thanks Pekon. But as Ezequiel said, i also think that this patch is more readable.

Thanks again
Huang Shijie

  parent reply	other threads:[~2014-03-24  3:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-21 10:19 [PATCH] mtd: gpmi: add gpmi_devdata{} to simplify the code Huang Shijie
2014-03-21 10:29 ` Gupta, Pekon
2014-03-21 10:35   ` Huang Shijie
2014-03-21 11:15     ` Gupta, Pekon
2014-03-21 14:51       ` Ezequiel Garcia
2014-03-24  2:28       ` Huang Shijie [this message]
2014-04-16  7:53 ` Brian Norris

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=20140324022803.GA11377@localhost \
    --to=b32955@freescale.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --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 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).