From 86d7ea33af1d6565afb169aefafff6cd08e30fe6 Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Tue, 15 Aug 2017 17:45:38 -0700 Subject: cr50: Remove BOARD_AP_USB property We previously disabled the USB PHY to the AP. But the BOARD_AP_USB property lingered on. Remove the property. Also clean up the idle task deciding when to do utmi wakes. With the AP USB connection disabled, that's only necessary when the debug cable is attached, so we can check that explicitly. BUG=none BRANCH=cr50 TEST=make buildall; boot CR50_DEV=1 image Change-Id: If81a7bcfe845d9d70dcc7e16239244a4f5f2427b Signed-off-by: Randall Spangler Reviewed-on: https://chromium-review.googlesource.com/616301 Reviewed-by: Vadim Bendebury Reviewed-by: Mary Ruthven --- chip/g/idle.c | 12 +++++++++--- chip/g/rdd.h | 6 ------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'chip') diff --git a/chip/g/idle.c b/chip/g/idle.c index ebdb747278..ea994e8dec 100644 --- a/chip/g/idle.c +++ b/chip/g/idle.c @@ -71,9 +71,15 @@ DECLARE_SAFE_CONSOLE_COMMAND(idle, command_idle, static int utmi_wakeup_is_enabled(void) { #ifdef CONFIG_RDD - return is_utmi_wakeup_allowed(); -#endif + /* + * USB is only used for CCD, so only enable UTMI wakeups when RDD + * detects that a debug accessory is attached. + */ + return rdd_is_connected(); +#else + /* USB is used for the host interface, so always enable UTMI wakeups */ return 1; +#endif } static void prepare_to_sleep(void) @@ -226,7 +232,7 @@ void __idle(void) while (1) { - /* Anyone still busy? */ + /* Anyone still busy? (this checks sleep_mask) */ sleep_ok = DEEP_SLEEP_ALLOWED; /* Wait a bit, just in case */ diff --git a/chip/g/rdd.h b/chip/g/rdd.h index 1f19ee9b3e..7fd5549ec5 100644 --- a/chip/g/rdd.h +++ b/chip/g/rdd.h @@ -12,10 +12,4 @@ void rdd_detached(void); /* Attach to debug cable */ void rdd_attached(void); -/* - * USB is only used for CCD, so only enable UTMI wakeups when RDD detects that - * a debug accessory is attached and disable it as a wakeup source when the - * cable is detached. - */ -int is_utmi_wakeup_allowed(void); #endif /* __CROS_RDD_H */ -- cgit v1.2.1