diff options
author | Shamile Khan <shamile.khan@intel.com> | 2015-06-05 17:01:14 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-06-12 16:37:47 +0000 |
commit | a0bec46ef3f7804ad4ae59d5a89b89da636a54a3 (patch) | |
tree | 8db4bb611efb0d4589f2c752554c1e3d783a3a8c /chip/mec1322 | |
parent | 5b7cfac64e971a7e925d17a8b33e651a01e71707 (diff) | |
download | chrome-ec-a0bec46ef3f7804ad4ae59d5a89b89da636a54a3.tar.gz |
spi/mec1322: Ensure that SPI Flash write chunks do not cross
Page Boundary.
If SPI Flash write is at an offset within the page and the length
is greater than remainder of the page, the Flash page gets
corrupted as addressing wraps to the beginning of page and
previously written data gets overwritten. This change splits SPI
Flash writes in such cases into two operations in different pages.
BUG=None
BRANCH=None
TEST=During Software Sync, Depthcharge sends Flash write chunks that
cross page boundary. With this change, the RW parition does not get
corrupted. This can be confirmed by executing a successful
"sysjump RW" after a Software Sync.
Change-Id: I46349eea0d8e927353de7cb55a61e9960291adb6
Signed-off-by: Shamile Khan <shamile.khan@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/275760
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'chip/mec1322')
-rw-r--r-- | chip/mec1322/flash.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/chip/mec1322/flash.c b/chip/mec1322/flash.c index 9681511f5a..e4ee512172 100644 --- a/chip/mec1322/flash.c +++ b/chip/mec1322/flash.c @@ -62,8 +62,6 @@ int flash_physical_write(int offset, int size, const char *data) (uint8_t *)data + i); if (ret != EC_SUCCESS) break; - /* BUG: Multi-page writes fail if no delay */ - msleep(1); } spi_enable(0); return ret; |