mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
spi_flash: Reload watchdog after erasing each 32K block
A single erase host command may erase an arbitrarily large region of storage, which may lead to our watchdog firing. BUG=chrome-os-partner:50587 BRANCH=glados TEST=Manual on glados, flash RW EC / PD FW while plugging + unplugging zinger. Verify that watchdog doesn't fire. Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: I90dc85306aec43326c11c794861f68c6e12686e4 Reviewed-on: https://chromium-review.googlesource.com/329987 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
faa870945e
commit
2843987640
@@ -230,6 +230,11 @@ int spi_flash_erase(unsigned int offset, unsigned int bytes)
|
||||
|
||||
bytes -= 32 * 1024;
|
||||
offset += 32 * 1024;
|
||||
/*
|
||||
* Refresh watchdog since we may be erasing a large
|
||||
* number of blocks.
|
||||
*/
|
||||
watchdog_reload();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user