public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 0/2] SPI flash update command
@ 2013-07-03 18:33 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-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
  0 siblings, 2 replies; 8+ messages in thread
From: Gerlando Falauto @ 2013-07-03 18:33 UTC (permalink / raw)
  To: u-boot

Hi,

this patchset allows "sf update" to erase+write a number of bytes which is not a
multiple of the sector size.  Start address must still be sector-aligned though.

The first patch trivially makes it such it will always erase an entire sector
before writing, regardless of the amount of data to write (i.e. the last sector
is erased completely before writing it only partially).

The second patch just makes sure that the original data at the end of the sector
is written back so to apparently remain unchanged.

Changes from v2:
 - Perform two write operations but have cleaner code
Changes from v1 [April, 03, 2012 (!)]:
 - Rebased on top of u-boot-spi/master

Gerlando Falauto (2):
  cmd_sf: let "sf update" erase last sector as a whole
  cmd_sf: "sf update" preserve the final part of the last sector

 common/cmd_sf.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

-- 
1.8.0.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-08-06 19:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox