diff options
author | Bill Richardson <wfrichar@chromium.org> | 2016-04-27 22:08:02 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-04-29 07:34:53 -0700 |
commit | c5dd305dffe25c6fa85e7201a4be19a835601f38 (patch) | |
tree | 6e28e0023d9a7670e45f20d0652755e6cfd428c0 /board/cr50 | |
parent | 38c93a26f32c49f3cc6aa5ddb057f7a788633bfb (diff) | |
download | chrome-ec-c5dd305dffe25c6fa85e7201a4be19a835601f38.tar.gz |
Cr50: Move board-specific rdd stuff out of chip/g/
Poking GPIOs is something that belongs in board/ not chip/
BUG=none
BRANCH=none
TEST=make buildall; test on Kevin
Change-Id: I798053c3760415ed787800d37eb81c765b826399
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/341065
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'board/cr50')
-rw-r--r-- | board/cr50/rdd.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/board/cr50/rdd.c b/board/cr50/rdd.c index 66f6c8c313..ed30094bf3 100644 --- a/board/cr50/rdd.c +++ b/board/cr50/rdd.c @@ -4,6 +4,7 @@ */ #include "console.h" +#include "gpio.h" #include "rdd.h" #include "registers.h" #include "usb_api.h" @@ -22,11 +23,11 @@ static void usart_tx_disconnect(void) void rdd_attached(void) { + /* Indicate case-closed debug mode (active low) */ + gpio_set_level(GPIO_CCD_MODE_L, 0); + /* Select the CCD PHY */ usb_select_phy(USB_SEL_PHY1); - - /* Connect to selected phy */ - usb_init(); } void rdd_detached(void) @@ -34,11 +35,11 @@ void rdd_detached(void) /* Disconnect from AP and EC UART TX */ usart_tx_disconnect(); + /* Done with case-closed debug mode */ + gpio_set_level(GPIO_CCD_MODE_L, 1); + /* Select the AP PHY */ usb_select_phy(USB_SEL_PHY0); - - /* Connect to selected phy */ - usb_init(); } static int command_uart(int argc, char **argv) |