From 67e88fa7b7eca2cbbc552a5a02e088995dd3a76a Mon Sep 17 00:00:00 2001 From: Dino Li Date: Thu, 6 Aug 2015 17:58:42 +0800 Subject: 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 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 Commit-Queue: Dino Li Tested-by: Dino Li --- chip/it83xx/flash.c | 5 +++-- 1 file 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; } } -- cgit v1.2.1