From: Jagan Teki <jagannadh.teki@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 1/2] cmd_sf: let "sf update" erase last sector as a whole
Date: Wed, 07 Aug 2013 00:32:22 +0530 [thread overview]
Message-ID: <5201483E.7010808@gmail.com> (raw)
In-Reply-To: <520146FF.1020205@gmail.com>
On 07-08-2013 00:27, Jagan Teki wrote:
> On 04-07-2013 00:03, Gerlando Falauto wrote:
>> make "sf update" work with unaligned `len' parameter, by deleting the
>> whole last sector before writing, so to allow for:
>>
>> sf update ${load_addr_r} 0 ${filesize}
>>
>> Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
>> Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
>> Cc: Holger Brunck <holger.brunck@keymile.com>
>> Acked-by: Simon Glass <sjg@chromium.org>
>> ---
>> common/cmd_sf.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/common/cmd_sf.c b/common/cmd_sf.c
>> index 19b0dc9..ab35a94 100644
>> --- a/common/cmd_sf.c
>> +++ b/common/cmd_sf.c
>> @@ -160,7 +160,8 @@ static const char *spi_flash_update_block(struct
>> spi_flash *flash, u32 offset,
>> *skipped += len;
>> return NULL;
>> }
>> - if (spi_flash_erase(flash, offset, len))
>> + /* Erase the entire sector */
>> + if (spi_flash_erase(flash, offset, flash->sector_size))
>> return "erase";
>> if (spi_flash_write(flash, offset, len, buf))
>> return "write";
>>
> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
>
> --
> Thanks,
> Jagan.
Applied to u-boot-spi/master
--
Thanks,
Jagan.
next prev parent reply other threads:[~2013-08-06 19:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-03 18:33 [U-Boot] [PATCH v3 0/2] SPI flash update command Gerlando Falauto
2013-07-03 18:33 ` [U-Boot] [PATCH v3 1/2] cmd_sf: let "sf update" erase last sector as a whole Gerlando Falauto
2013-08-06 18:57 ` Jagan Teki
2013-08-06 19:02 ` Jagan Teki [this message]
2013-07-03 18:33 ` [U-Boot] [PATCH v3 2/2] cmd_sf: let "sf update" preserve the final part of the last sector Gerlando Falauto
2013-07-04 16:26 ` Jagan Teki
2013-07-05 7:31 ` Gerlando Falauto
2013-08-06 18:25 ` Jagan Teki
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=5201483E.7010808@gmail.com \
--to=jagannadh.teki@gmail.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.