From 8e326b6b0a922fff9cb264ecf292cb66761ab4ae Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 11 Apr 2012 11:07:16 -0700 Subject: [PATCH] Don't trigger watchdog when power button is held down This situation occurs during USB download - the EC resets itself which causes USB programming to generally fail. Is this the correct fix? BUG=none TEST=build on daisy and discovery; run on daisy $ cros_bundle_firmware -b daisy -w usb See that it now succeeds Change-Id: I293e85d08d3c488d5b6bebe3379deb949f211986 Signed-off-by: Simon Glass --- common/gaia_power.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/gaia_power.c b/common/gaia_power.c index 7e381c5868..110157481c 100644 --- a/common/gaia_power.c +++ b/common/gaia_power.c @@ -93,6 +93,12 @@ static void wait_for_power_off(void) TASK_EVENT_TIMER)) return; } + + /* + * Holding down the power button causes this loop to spin + * endlessly, triggering the watchdog. So add a wait here. + */ + task_wait_event(-1); } }