diff options
author | Randall Spangler <rspangler@chromium.org> | 2017-08-15 17:45:38 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-08-17 01:56:48 -0700 |
commit | 86d7ea33af1d6565afb169aefafff6cd08e30fe6 (patch) | |
tree | a30dc22bd39c91de4e45243851e790155de831ff /chip | |
parent | f2b3aa47a6e2b11ef1888219284ef0f727944ef2 (diff) | |
download | chrome-ec-86d7ea33af1d6565afb169aefafff6cd08e30fe6.tar.gz |
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 <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/616301
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/g/idle.c | 12 | ||||
-rw-r--r-- | chip/g/rdd.h | 6 |
2 files changed, 9 insertions, 9 deletions
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 */ |