Files
OpenCellular/common
Simon Glass 21c1bf9628 flash: Only erase flash block that contain data
It wastes time to erase blocks that are already erased and it is faster
on stm32 to check first. Add a check in flash_physical_erase() on all
chips, using a common flash_is_erased() function.

BUG=none
BRANCH=snow,link
TEST=manual
Do software sync in U-Boot and see that it succeeds. This tests that
we can still erase and then boot a written image. It typically saves
a second on a full sync over i2c.

SMDK5250 # cros_test swsync -f
SF: Detected W25Q32 with page size 4 KiB, total 4 MiB
Flashing RW EC image: erasing, writing, done
Flashing RO EC image: erasing, writing, done
Full software sync completed in 22.949s
SMDK5250 #

Also see that second erase is faster:

SMDK5250 # time mkbp erase rw

time: 0.952 seconds, 952 ticks
SMDK5250 # time mkbp erase rw

time: 0.054 seconds, 54 ticks
SMDK5250 #

Change-Id: I3699577217fdbb2f212d20d150d3ca15fdff03eb
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30851
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-08-23 14:40:01 -07:00
..
2012-08-06 00:05:51 -07:00
2012-08-07 19:06:33 -07:00
2012-07-10 14:56:05 -07:00
2012-07-17 13:11:44 -07:00
2012-07-17 13:11:44 -07:00
2012-08-09 19:18:20 -07:00
2012-08-09 14:38:16 -07:00
2012-06-27 00:55:04 -07:00
2012-06-25 07:15:50 -07:00
2012-05-25 13:34:06 -07:00
2012-07-30 13:41:33 -07:00
2012-08-09 17:40:37 -07:00
2012-08-07 19:06:43 -07:00
2012-05-25 13:34:06 -07:00
2012-07-23 23:30:33 -07:00
2012-08-06 12:06:43 -07:00
2012-08-13 14:22:23 -07:00