Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: RogerCC.Lin <rogercc.lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
To: Boris Brezillon
	<boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Cc: srv_heupstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
	bayi.cheng-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	xiaolei.li-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
	computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.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-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> 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
     [not found] ` <1511947486-7707-1-git-send-email-rogercc.lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
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
     [not found]     ` <1511947486-7707-3-git-send-email-rogercc.lin-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
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-nus5lvnupcjwk0htik3j/w@public.gmane.org \
    --cc=bayi.cheng-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=srv_heupstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=xiaolei.li-NuS5LvNUpcJWk0Htik3J/w@public.gmane.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