diff options
author | Tim Lin <tim2.lin@ite.corp-partner.google.com> | 2021-06-04 14:11:25 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-09 18:54:47 +0000 |
commit | 670bd7e258d352a2ea197e055e46b60690935afc (patch) | |
tree | 9a223dbbdde5e822f63475fdb0a39c0dc1300112 /common/update_fw.c | |
parent | 3bf7cf9dfe738f1f156d6b9dc5ade87290d1d78e (diff) | |
download | chrome-ec-670bd7e258d352a2ea197e055e46b60690935afc.tar.gz |
include/flash: rename the APIs
The names conflict when enabling both Zephyr's flash driver and
CONFIG_FLASH_CROS option. Rename all the APIs in include/flash.h
BUG=b:187192628
BRANCH=none
TEST=make buildall -j4
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Change-Id: If1fd0ea28fa9f5cec1c1daa8f72f63eb7a0e6500
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2931749
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'common/update_fw.c')
-rw-r--r-- | common/update_fw.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/common/update_fw.c b/common/update_fw.c index bdb432acd6..068758e7b0 100644 --- a/common/update_fw.c +++ b/common/update_fw.c @@ -80,7 +80,8 @@ static uint8_t check_update_chunk(uint32_t block_offset, size_t body_size) * be erased. */ if (block_offset == base) { - if (flash_physical_erase(base, size) != EC_SUCCESS) { + if (crec_flash_physical_erase(base, size) != + EC_SUCCESS) { CPRINTF("%s:%d erase failure of 0x%x..+0x%x\n", __func__, __LINE__, base, size); return UPDATE_ERASE_FAILURE; @@ -189,7 +190,7 @@ void fw_update_start(struct first_response_pdu *rpdu) } rpdu->common.maximum_pdu_size = htobe32(CONFIG_UPDATE_PDU_SIZE); - rpdu->common.flash_protection = htobe32(flash_get_protect()); + rpdu->common.flash_protection = htobe32(crec_flash_get_protect()); rpdu->common.offset = htobe32(update_section.base_offset); if (version) memcpy(rpdu->common.version, version, @@ -300,7 +301,7 @@ void fw_update_command_handler(void *body, #endif CPRINTF("update: 0x%x\n", block_offset + CONFIG_PROGRAM_MEMORY_BASE); - if (flash_physical_write(block_offset, body_size, update_data) + if (crec_flash_physical_write(block_offset, body_size, update_data) != EC_SUCCESS) { *error_code = UPDATE_WRITE_FAILURE; CPRINTF("%s:%d update write error\n", __func__, __LINE__); |