diff options
author | Dino Li <dino.li@ite.com.tw> | 2015-08-06 17:58:42 +0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-08-06 14:24:53 +0000 |
commit | 67e88fa7b7eca2cbbc552a5a02e088995dd3a76a (patch) | |
tree | 19c177f1de64e065de2f0b380f51f3c29c3c92b6 | |
parent | 63a6068742e8261c00b8f743e3aa1549e4384f6a (diff) | |
download | chrome-ec-67e88fa7b7eca2cbbc552a5a02e088995dd3a76a.tar.gz |
it8380dev: speed up flash verifying
No need to use EC in-direct fast read for verifying, just a pointer.
symptom:
ectool erase 128KB RW image will show "Timeout waiting for EC response",
but the erase is success.
Signed-off-by: Dino Li <dino.li@ite.com.tw>
BRANCH=none
BUG=none
TEST=ectool erase RW image will show the correct message.
Change-Id: Ie07d087ec004edc730bd084dd2e9b541f84adc2b
Reviewed-on: https://chromium-review.googlesource.com/290525
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Dino Li <dino.li@ite.com.tw>
Tested-by: Dino Li <dino.li@ite.com.tw>
-rw-r--r-- | chip/it83xx/flash.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chip/it83xx/flash.c b/chip/it83xx/flash.c index 579aea3fce..56ad220df1 100644 --- a/chip/it83xx/flash.c +++ b/chip/it83xx/flash.c @@ -245,17 +245,18 @@ int FLASH_DMA_CODE dma_flash_verify(int addr, int size, const char *data) { int i; uint8_t *wbuf = (uint8_t *)data; + uint8_t *flash = (uint8_t *)addr; /* verify for erase */ if (data == NULL) { for (i = 0; i < size; i++) { - if (dma_flash_indirect_fast_read(addr + i) != 0xFF) + if (flash[i] != 0xFF) return EC_ERROR_UNKNOWN; } /* verify for write */ } else { for (i = 0; i < size; i++) { - if (dma_flash_indirect_fast_read(addr + i) != wbuf[i]) + if (flash[i] != wbuf[i]) return EC_ERROR_UNKNOWN; } } |