linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Anatolij Gustschin <agust@denx.de>
To: Guillaume LECERF <glecerf@gmail.com>
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>,
	linux-mtd@lists.infradead.org,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH v2 2/6] mtd: cfi: add writebufsize initialization
Date: Thu, 6 Jan 2011 11:48:49 +0100	[thread overview]
Message-ID: <20110106114849.4add9726@wker> (raw)
In-Reply-To: <AANLkTi=DHrBiBd8j3fFR5zmuX2cXC05sEFFRdF_btK3Y@mail.gmail.com>

On Mon, 20 Dec 2010 17:36:57 +0100
Guillaume LECERF <glecerf@gmail.com> wrote:

> Hello.

Hello.

> 2010/12/16 Anatolij Gustschin <agust@denx.de>:
> > Initialize mtd->writebufsize to the value obtained
> > by CFI query command at probe time.
> >
> > Signed-off-by: Anatolij Gustschin <agust@denx.de>
> > ---
> > --- a/drivers/mtd/chips/cfi_cmdset_0002.c
> > +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
> > @@ -428,6 +428,10 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary)
> >        mtd->flags   = MTD_CAP_NORFLASH;
> >        mtd->name    = map->name;
> >        mtd->writesize = 1;
> > +       mtd->writebufsize = 1 << cfi->cfiq->MaxBufWriteSize;
> 
> What about wbufsize initialized in cfi_amdstd_write_buffers() to
> "cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize" ?
> I don't know this piece of code, but I just wanted to point it to you.

wbufsize is initialized there so that it takes into account the
chip interleaving. If we e.g. have 64 byte write buffer in each
chip and two 16-bit chips in 32-bit bank, the wbufsize will be
initialized to 128 since the cfi_interleave(cfi) will return 2 in
this case. It is really local to the cfi driver. For UBI to work
correctly we need to export the the real physical write buffer size
of one chip, nothing else. So my patch is correct.

Anatolij

  parent reply	other threads:[~2011-01-06 10:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <292342500.2538.65.camel@localhost>
2010-12-16 22:42 ` [PATCH v2 0/6] Fix UBIFS recovery issues observed on NOR flash Anatolij Gustschin
2010-12-16 22:42 ` [PATCH v2 1/6] mtd: add writebufsize field to mtd_info struct Anatolij Gustschin
2010-12-19 17:45   ` Artem Bityutskiy
2010-12-20  9:15     ` Anatolij Gustschin
2010-12-16 22:42 ` [PATCH v2 2/6] mtd: cfi: add writebufsize initialization Anatolij Gustschin
2010-12-19 17:45   ` Artem Bityutskiy
2010-12-20 16:36   ` Guillaume LECERF
2010-12-21 14:45     ` Artem Bityutskiy
2010-12-30 10:32       ` Guillaume LECERF
2010-12-30 11:49         ` Guillaume LECERF
2011-01-05  8:27           ` Artem Bityutskiy
2011-01-06 11:13             ` Anatolij Gustschin
2011-01-06 11:14               ` Artem Bityutskiy
2011-01-06 11:00         ` Anatolij Gustschin
2011-01-06 10:49       ` Anatolij Gustschin
2011-01-06 10:48     ` Anatolij Gustschin [this message]
2010-12-16 22:42 ` [PATCH v2 3/6] mtd: nand: add mtd->writebufsize initialization Anatolij Gustschin
2010-12-16 22:42 ` [PATCH v2 4/6] mtd: onenand: " Anatolij Gustschin
2010-12-16 22:42 ` [PATCH v2 5/6] mtd: initialize writebufsize in the MTD object of a partition Anatolij Gustschin
2010-12-16 22:42 ` [PATCH v2 6/6] UBI: use mtd->writebufsize to set minimal I/O unit size Anatolij Gustschin
2010-12-19 17:46   ` Artem Bityutskiy
2010-12-20  9:18     ` Anatolij Gustschin

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=20110106114849.4add9726@wker \
    --to=agust@denx.de \
    --cc=Artem.Bityutskiy@nokia.com \
    --cc=dwmw2@infradead.org \
    --cc=glecerf@gmail.com \
    --cc=linux-mtd@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).