From 0616b24162f10d50b469c1b6896e6ed6f9a756ed Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Sat, 13 Sep 2014 14:01:34 +0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/218080 Reviewed-by: Alec Berg --- chip/stm32/flash-stm32f.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/chip/stm32/flash-stm32f.c b/chip/stm32/flash-stm32f.c index 52220e4d23..7c41498377 100644 --- a/chip/stm32/flash-stm32f.c +++ b/chip/stm32/flash-stm32f.c @@ -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; -- cgit v1.2.1