All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris BREZILLON <boris.brezillon@free-electrons.com>
To: Huang Shijie <shijie8@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	linux-mtd@lists.infradead.org,
	Huang Shijie <b32955@freescale.com>,
	Mike Voytovich <mvoytovich@paypal.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, Roy Lee <roylee@paypal.com>
Subject: Re: [PATCH] mtd: nand: gpmi: add proper raw access support
Date: Thu, 11 Sep 2014 16:45:36 +0200	[thread overview]
Message-ID: <20140911164536.796f1012@bbrezillon> (raw)
In-Reply-To: <20140911142930.GB2543@localhost.localdomain>

On Thu, 11 Sep 2014 22:29:32 +0800
Huang Shijie <shijie8@gmail.com> wrote:

> On Wed, Sep 10, 2014 at 10:55:39AM +0200, Boris BREZILLON wrote:
>  +static int gpmi_ecc_read_page_raw(struct mtd_info *mtd,
> > +				  struct nand_chip *chip, uint8_t *buf,
> > +				  int oob_required, int page)
> > +{
> > +	struct gpmi_nand_data *this = chip->priv;
> > +	struct bch_geometry *nfc_geo = &this->bch_geometry;
> > +	int eccsize = nfc_geo->ecc_chunk_size;
> > +	int eccbytes = DIV_ROUND_UP(nfc_geo->ecc_strength * nfc_geo->gf_len,
> > +				    8);
> 
> In actually, the ECC can be _NOT_ bytes aligned.
> you should not round up to byte.

You mean, on the NAND storage ? That would be weird, but I'll check.

When accessing in raw mode I'm not using the ECC engine (or at least
that's what I'm trying to achieve when using read_buf and not
gpmi_ecc_read_page).



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: Boris BREZILLON <boris.brezillon@free-electrons.com>
To: Huang Shijie <shijie8@gmail.com>
Cc: Mike Voytovich <mvoytovich@paypal.com>,
	linux-kernel@vger.kernel.org, Huang Shijie <b32955@freescale.com>,
	linux-mtd@lists.infradead.org, Roy Lee <roylee@paypal.com>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mtd: nand: gpmi: add proper raw access support
Date: Thu, 11 Sep 2014 16:45:36 +0200	[thread overview]
Message-ID: <20140911164536.796f1012@bbrezillon> (raw)
In-Reply-To: <20140911142930.GB2543@localhost.localdomain>

On Thu, 11 Sep 2014 22:29:32 +0800
Huang Shijie <shijie8@gmail.com> wrote:

> On Wed, Sep 10, 2014 at 10:55:39AM +0200, Boris BREZILLON wrote:
>  +static int gpmi_ecc_read_page_raw(struct mtd_info *mtd,
> > +				  struct nand_chip *chip, uint8_t *buf,
> > +				  int oob_required, int page)
> > +{
> > +	struct gpmi_nand_data *this = chip->priv;
> > +	struct bch_geometry *nfc_geo = &this->bch_geometry;
> > +	int eccsize = nfc_geo->ecc_chunk_size;
> > +	int eccbytes = DIV_ROUND_UP(nfc_geo->ecc_strength * nfc_geo->gf_len,
> > +				    8);
> 
> In actually, the ECC can be _NOT_ bytes aligned.
> you should not round up to byte.

You mean, on the NAND storage ? That would be weird, but I'll check.

When accessing in raw mode I'm not using the ECC engine (or at least
that's what I'm trying to achieve when using read_buf and not
gpmi_ecc_read_page).



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: boris.brezillon@free-electrons.com (Boris BREZILLON)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mtd: nand: gpmi: add proper raw access support
Date: Thu, 11 Sep 2014 16:45:36 +0200	[thread overview]
Message-ID: <20140911164536.796f1012@bbrezillon> (raw)
In-Reply-To: <20140911142930.GB2543@localhost.localdomain>

On Thu, 11 Sep 2014 22:29:32 +0800
Huang Shijie <shijie8@gmail.com> wrote:

> On Wed, Sep 10, 2014 at 10:55:39AM +0200, Boris BREZILLON wrote:
>  +static int gpmi_ecc_read_page_raw(struct mtd_info *mtd,
> > +				  struct nand_chip *chip, uint8_t *buf,
> > +				  int oob_required, int page)
> > +{
> > +	struct gpmi_nand_data *this = chip->priv;
> > +	struct bch_geometry *nfc_geo = &this->bch_geometry;
> > +	int eccsize = nfc_geo->ecc_chunk_size;
> > +	int eccbytes = DIV_ROUND_UP(nfc_geo->ecc_strength * nfc_geo->gf_len,
> > +				    8);
> 
> In actually, the ECC can be _NOT_ bytes aligned.
> you should not round up to byte.

You mean, on the NAND storage ? That would be weird, but I'll check.

When accessing in raw mode I'm not using the ECC engine (or at least
that's what I'm trying to achieve when using read_buf and not
gpmi_ecc_read_page).



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2014-09-11 14:45 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10  8:55 [PATCH] mtd: nand: gpmi: add proper raw access support Boris BREZILLON
2014-09-10  8:55 ` Boris BREZILLON
2014-09-10  8:55 ` Boris BREZILLON
2014-09-11 12:09 ` Huang Shijie
2014-09-11 12:09   ` Huang Shijie
2014-09-11 12:09   ` Huang Shijie
2014-09-11 12:36   ` Boris BREZILLON
2014-09-11 12:36     ` Boris BREZILLON
2014-09-11 12:36     ` Boris BREZILLON
2014-09-11 14:25     ` Huang Shijie
2014-09-11 14:25       ` Huang Shijie
2014-09-11 14:25       ` Huang Shijie
2014-09-11 14:38       ` Boris BREZILLON
2014-09-11 14:38         ` Boris BREZILLON
2014-09-11 14:38         ` Boris BREZILLON
2014-09-12  0:45         ` Huang Shijie
2014-09-12  0:45           ` Huang Shijie
2014-09-12  0:45           ` Huang Shijie
2014-09-12 12:30           ` Boris BREZILLON
2014-09-12 12:30             ` Boris BREZILLON
2014-09-12 12:30             ` Boris BREZILLON
2014-09-13 15:36             ` Huang Shijie
2014-09-13 15:36               ` Huang Shijie
2014-09-13 15:36               ` Huang Shijie
2014-09-13 17:38               ` Brian Norris
2014-09-13 17:38                 ` Brian Norris
2014-09-13 17:38                 ` Brian Norris
2014-09-14 14:07                 ` Boris BREZILLON
2014-09-14 14:07                   ` Boris BREZILLON
2014-09-14 14:07                   ` Boris BREZILLON
2014-09-15 14:43                 ` Huang Shijie
2014-09-15 14:43                   ` Huang Shijie
2014-09-15 14:43                   ` Huang Shijie
2014-09-15 20:12                   ` Boris BREZILLON
2014-09-15 20:12                     ` Boris BREZILLON
2014-09-15 20:12                     ` Boris BREZILLON
2014-09-17 15:26                     ` Huang Shijie
2014-09-17 15:26                       ` Huang Shijie
2014-09-17 15:26                       ` Huang Shijie
2014-09-17 18:16                       ` Boris BREZILLON
2014-09-17 18:16                         ` Boris BREZILLON
2014-09-17 18:16                         ` Boris BREZILLON
2014-09-29  1:22     ` Iwo Mergler
2014-09-29  1:22       ` Iwo Mergler
2014-09-29  1:22       ` Iwo Mergler
2014-09-30  8:04       ` Boris Brezillon
2014-09-30  8:04         ` Boris Brezillon
2014-09-30  8:04         ` Boris Brezillon
2014-10-02  6:52         ` Iwo Mergler
2014-10-02  6:52           ` Iwo Mergler
2014-10-02  6:52           ` Iwo Mergler
2014-09-11 14:29 ` Huang Shijie
2014-09-11 14:29   ` Huang Shijie
2014-09-11 14:29   ` Huang Shijie
2014-09-11 14:45   ` Boris BREZILLON [this message]
2014-09-11 14:45     ` Boris BREZILLON
2014-09-11 14:45     ` Boris BREZILLON
2014-09-12  0:40     ` Huang Shijie
2014-09-12  0:40       ` Huang Shijie
2014-09-12  0:40       ` 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=20140911164536.796f1012@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=b32955@freescale.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mvoytovich@paypal.com \
    --cc=roylee@paypal.com \
    --cc=shijie8@gmail.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.