linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: RogerCC.Lin <rogercc.lin@mediatek.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: <computersforpeace@gmail.com>, <srv_heupstream@mediatek.com>,
	<bayi.cheng@mediatek.com>, <linux-mtd@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>, <xiaolei.li@mediatek.com>,
	<dwmw2@infradead.org>
Subject: Re: [PATCH 2/3] mtd: nand: mtk: Support different MTK NAND flash controller IP
Date: Wed, 29 Nov 2017 18:12:39 +0800	[thread overview]
Message-ID: <1511950359.7778.2.camel@mtkswgap22> (raw)
In-Reply-To: <20171129110441.3c6f1e3a@bbrezillon>

Hi, Boris,

On Wed, 2017-11-29 at 11:04 +0100, Boris Brezillon wrote:
> Hi,
> 
> On Wed, 29 Nov 2017 17:24:45 +0800
> RogerCC Lin <rogercc.lin@mediatek.com> wrote:
> 
> 
> > diff --git a/drivers/mtd/nand/mtk_ecc.h b/drivers/mtd/nand/mtk_ecc.h
> > index d245c14..764adb6 100644
> > --- a/drivers/mtd/nand/mtk_ecc.h
> > +++ b/drivers/mtd/nand/mtk_ecc.h
> > @@ -14,8 +14,6 @@
> >  
> >  #include <linux/types.h>
> >  
> > -#define ECC_PARITY_BITS		(14)
> > -
> >  enum mtk_ecc_mode {ECC_DMA_MODE = 0, ECC_NFI_MODE = 1};
> >  enum mtk_ecc_operation {ECC_ENCODE, ECC_DECODE};
> >  
> > @@ -37,6 +35,29 @@ struct mtk_ecc_config {
> >  	u32 len;
> >  };
> >  
> > +struct mtk_ecc_caps {
> > +	u32 err_mask;
> > +	const u8 *ecc_strength;
> > +	const u32 *ecc_regs;
> > +	u8 num_ecc_strength;
> > +	u8 ecc_mode_shift;
> > +	u8 parity_bits;
> > +	int pg_irq_sel;
> > +};
> > +
> > +struct mtk_ecc {
> > +	struct device *dev;
> > +	const struct mtk_ecc_caps *caps;
> > +	void __iomem *regs;
> > +	struct clk *clk;
> > +
> > +	struct completion done;
> > +	struct mutex lock;
> > +	u32 sectors;
> > +
> > +	u8 *eccdata;
> > +};
> 
> Can you please keep these information private and instead provide a
> helper to query the parity bits info, something like:
> 
> unsigned int mtk_ecc_get_parity_bits(struct mtk_ecc *ecc);

Yes, got it, I will do this in next patch, 

thanks,

Roger

> Regards,
> 
> Boris
> 
> 

  reply	other threads:[~2017-11-29 10:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-29  9:24 [PATCH 0/3] Support MT7622 NAND flash controller RogerCC Lin
2017-11-29  9:24 ` [PATCH 1/3] mtd: nand: mtk: update DT bindings RogerCC Lin
2017-11-29  9:24 ` [PATCH 2/3] mtd: nand: mtk: Support different MTK NAND flash controller IP RogerCC Lin
2017-11-29 10:04   ` Boris Brezillon
2017-11-29 10:12     ` RogerCC.Lin [this message]
2017-11-29  9:24 ` [PATCH 3/3] mtd: nand: mtk: Support MT7622 NAND flash controller RogerCC Lin

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=1511950359.7778.2.camel@mtkswgap22 \
    --to=rogercc.lin@mediatek.com \
    --cc=bayi.cheng@mediatek.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=srv_heupstream@mediatek.com \
    --cc=xiaolei.li@mediatek.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).