From: Wolfram Sang <w.sang@pengutronix.de>
To: Guillaume LECERF <glecerf@gmail.com>
Cc: linux-mtd <linux-mtd@lists.infradead.org>,
David Woodhouse <dwmw2@infradead.org>,
Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: [PATCH v2 6/7] mtd: cfi_cmdset_0002: add CFI detection for SST 39VF{16, 32}xx chips
Date: Mon, 19 Apr 2010 01:29:06 +0200 [thread overview]
Message-ID: <20100418232906.GB16563@pengutronix.de> (raw)
In-Reply-To: <h2ub8e9195f1004160317y9018618ax2b2df9f3d7ee3f98@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2268 bytes --]
Hi Guillaume,
> > Okay, my remark was rubbish, yet the comment in the source was a bit confusing,
> > too. It is correct, though maybe the term 'region' is a bit overloaded. What
> > about replacing both comments with something a bit simpler like this:
> >
> > /*
> > * These flashes report two seperate eraseblock regions based on the
> > * sector_erase-size and block_erase-size, although they both operate on the
> > * same memory. This is not allowed according to CFI, so we just pick the
> > * sector_erase-size.
> > */
> >
Any opinion about this change?
> > This is according to the datasheets. You pick the block-data size here
> > (ususally using command 0x50). Why is that? I tried sector_size on a
> > SST39WF1601 and it works fine so far, testing with mtd_stresstest. (Sidenote: I
> > have to use JEDEC-probing though, as my flashes don't report 0x701 but 0x002
> > (AMD standard) as their primary command set. But they still need their custom
> > unlock address :( )
>
> The 39VF3201 chip I use is on a brcm63xx board, running OpenWRT. It
> reports 2 erase regions (as indicated in the datasheet):
>
> Number of Erase Block Regions: 2
> Erase Region #0: BlockSize 0x1000 bytes, 1024 blocks
> Erase Region #1: BlockSize 0x10000 bytes, 64 blocks
Yes, same here.
> But the function parse_cfe_partitions() in
> drivers/mtd/maps/bcm963xx-flash.c [1] tries to read the partition
> table at $(master->erasesize) (cf. line 67).
> If I use the sector_erase-size, parse_cfe_partitions() tries to read
> at 0x1000, and fails because the partition table is actually at
> 0x10000 on my flash.
I see the problem, but think it should be fixed differently (in the driver?).
cfi_cmdset_0002.c uses CMD 0x30 for erasing (line 1604 in mtd/master). The SST
datasheet now tells that the chip then expects the sector address (table 6 or
figure 11). Given that I wonder if erasing truly works unless I missed
something (at least it fails with mtd_stresstest for me if I change my
jedec_probe to use 0x10000 instead of 0x1000).
Kind regards,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2010-04-18 23:29 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-30 13:34 [PATCH v2 1/7] mtd: cfi_probe: enter Auto Select Mode after filling cfi->cfiq members Guillaume LECERF
2010-03-30 13:34 ` [PATCH v2 2/7] mtd: cfi_probe: make the addresses used to enter Auto Select Mode variable Guillaume LECERF
2010-03-30 13:34 ` [PATCH v2 3/7] mtd: cfi_probe: add support for SST 0x0701 vendorname Guillaume LECERF
2010-04-08 9:05 ` Wolfram Sang
2010-04-12 3:36 ` Wolfram Sang
2010-03-30 13:35 ` [PATCH v2 4/7] mtd: cfi_probe: use P_ID_* definitions instead of hardcoded values Guillaume LECERF
2010-03-30 13:35 ` [PATCH v2 5/7] mtd: cfi_cmdset_0002: do not fail on no extended query table as they are both optional Guillaume LECERF
2010-03-30 13:35 ` [PATCH v2 6/7] mtd: cfi_cmdset_0002: add CFI detection for SST 39VF{16, 32}xx chips Guillaume LECERF
2010-04-08 9:12 ` Wolfram Sang
2010-04-12 2:24 ` Wolfram Sang
2010-04-12 16:28 ` Fabio Giovagnini
2010-04-13 0:27 ` Wolfram Sang
2010-04-16 10:17 ` Guillaume LECERF
2010-04-18 23:29 ` Wolfram Sang [this message]
2010-04-20 9:44 ` Guillaume LECERF
2010-04-22 6:13 ` Wolfram Sang
2010-04-08 15:21 ` Wolfram Sang
2010-04-08 15:32 ` Guillaume LECERF
2010-04-09 8:55 ` Wolfram Sang
2010-03-30 13:35 ` [PATCH v2 7/7] mtd: cfi_cmdset_0002: add CFI detection for SST 39VF{32, 64}xxB chips Guillaume LECERF
2010-03-31 13:28 ` [PATCH v2 1/7] mtd: cfi_probe: enter Auto Select Mode after filling cfi->cfiq members Artem Bityutskiy
2010-04-02 11:46 ` Guillaume LECERF
2010-04-02 12:11 ` Artem Bityutskiy
2010-04-08 8:59 ` Wolfram Sang
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=20100418232906.GB16563@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=dedekind1@gmail.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).