mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
5ef45ad19e839006a17668d792770021e022f3c8
For flash commands add timeout so if VDM doesn't return properly host can receive error message. Note, for flash erase its performed by page at a cost of 20-40ms according to datasheet. For hoho/dingdong that leaves maximum erase time at 40ms * 32 =< 1280ms which is above the host command timeout. Increasing the host command delay (i2c bus pending) is not an option and since the erase will complete and subsequent erases will be much faster do to early out in physical_flash_erase this solution should be acceptable. Future CLs could alternatively push the burden of command latency to host altogether and return EC_RES_SUCCESS in similar fashion to reboot command. Signed-off-by: Todd Broch <tbroch@chromium.org> BRANCH=samus BUG=chrome-os-partner:33947 TEST=manual, if VDM doesn't return by timeout HC command is properly returned EC_RES_TIMEOUT error code. Change-Id: I33c515200c2999dd97fdd690a7e900c5548b2d47 Reviewed-on: https://chromium-review.googlesource.com/238290 Reviewed-by: Alec Berg <alecaberg@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org> Commit-Queue: Todd Broch <tbroch@chromium.org>
For an overview of the Embedded Controller firmware, refer to http://www.chromium.org/chromium-os/2014-firmware-summit
Description
Languages
C
64.7%
Lasso
20.7%
ASL
3.6%
JavaScript
3.2%
C#
2.9%
Other
4.6%