From: Sergei Shtylyov <sshtylyov@mvista.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] sf: spansion: fixing erasing when sector size >64KiB
Date: Wed, 06 Oct 2010 14:07:25 +0400 [thread overview]
Message-ID: <4CAC4A5D.4060902@mvista.com> (raw)
In-Reply-To: <1286350635-24645-3-git-send-email-vapier@gentoo.org>
Hello.
On 06-10-2010 11:37, Mike Frysinger wrote:
> From: Marc-Andr? H?bert<hebert.marcandre@gmail.com>
> The spansion_erase currently only works when the sector size is 64KB.
> cmd[1] should contain the higher 8 bit of the 24 bit address of the
> sector to be erased. Currently it is holding the sector index to be
> erased which happens to be the same thing when the sector size is
> 64KB.
> Signed-off-by: Marc-Andre Hebert <marc-andre.hebert@humanware.com>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
> drivers/mtd/spi/spansion.c | 7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
> diff --git a/drivers/mtd/spi/spansion.c b/drivers/mtd/spi/spansion.c
> index d6c1a5f..94489af 100644
> --- a/drivers/mtd/spi/spansion.c
> +++ b/drivers/mtd/spi/spansion.c
[...]
> @@ -274,8 +273,8 @@ int spansion_erase(struct spi_flash *flash, u32 offset, size_t len)
> }
>
> ret = 0;
> - for (actual = 0; actual< len; actual++) {
> - cmd[1] = (offset / sector_size) + actual;
> + for (actual = 0; actual< len; actual+=sector_size) {
Please put spaces around += to keep the style consistent.
WBR, Sergei
next prev parent reply other threads:[~2010-10-06 10:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 7:37 [U-Boot] [PATCH 0/4] SPI updates for v2010.10 Mike Frysinger
2010-10-06 7:37 ` [U-Boot] [PATCH 1/4] sf: winbond: add support W25Q64 parts Mike Frysinger
2010-10-06 7:37 ` [U-Boot] [PATCH 2/4] sf: spansion: fixing erasing when sector size >64KiB Mike Frysinger
2010-10-06 10:07 ` Sergei Shtylyov [this message]
2010-10-07 0:58 ` [U-Boot] [PATCH 2/4 v2] " Mike Frysinger
2010-10-06 7:37 ` [U-Boot] [PATCH 3/4] sf: spansion: add support for S25FL032P parts Mike Frysinger
2010-10-06 7:37 ` [U-Boot] [PATCH 4/4] sspi: add options to specify bus and mode Mike Frysinger
2010-10-06 7:41 ` [U-Boot] [PATCH 0/4] SPI updates for v2010.10 Reinhard Meyer
2010-10-06 14:44 ` Mike Frysinger
2010-10-08 1:57 ` [U-Boot] Pull request u-boot-blackfin.git (sf branch) Mike Frysinger
2010-10-11 7:55 ` Wolfgang Denk
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=4CAC4A5D.4060902@mvista.com \
--to=sshtylyov@mvista.com \
--cc=u-boot@lists.denx.de \
/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.