mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
Remove PD power check in flash erase routine
Now that ping is disabled by default, we can remove the PD power check in flash erase routine. BUG=chrome-os-partner:31362 TEST=Build Ryu BRANCH=None Change-Id: Id021529aa2323050ff760b3ce22312c96f23609e Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/218080 Reviewed-by: Alec Berg <alecaberg@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
85063ee72d
commit
0616b24162
@@ -282,23 +282,6 @@ int flash_physical_erase(int offset, int size)
|
||||
{
|
||||
int res = EC_SUCCESS;
|
||||
|
||||
#ifdef CONFIG_USB_PD_FLASH_ERASE_CHECK
|
||||
/*
|
||||
* During flash erase operation, read is stalled and thus interrupt
|
||||
* might be serviced later. This can cause PD communication to fail.
|
||||
* This is unlikely going to affect normal users as they have
|
||||
* batteries. However, print a warning in the console for developers
|
||||
* without a battery.
|
||||
*
|
||||
* TODO(crosbug.com/p/31362): Remove this when PD ping is disabled.
|
||||
*/
|
||||
if (battery_is_present() != BP_YES) {
|
||||
ccprintf("WARNING: Performing flash erase while running on "
|
||||
"USB PD power only!\n");
|
||||
cflush();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (unlock(PRG_LOCK) != EC_SUCCESS)
|
||||
return EC_ERROR_UNKNOWN;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user