summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Staaf <robotboy@chromium.org>2015-02-09 10:51:53 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-02-10 23:07:16 +0000
commit5444205f7925acb2022412c129889091410e099b (patch)
tree458440144e7086f4d3ad99718b68b56ac6a60f03
parent6136b1fb09d44410dc8a591abf51d16e5eca3966 (diff)
downloadchrome-ec-5444205f7925acb2022412c129889091410e099b.tar.gz
CCD: Remove CCD specific board connect and disconnect
Previously the Case Closed Debugging system provided a way for the board to connect and disconnect the CCD USB lines correctly, but this functionality is better implemented by board_set_usb_mux. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j Change-Id: I697ee9740c64ac93557d9fca8b2d10e858c51193 Reviewed-on: https://chromium-review.googlesource.com/247721 Trybot-Ready: Anton Staaf <robotboy@chromium.org> Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Vic Yang <victoryang@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
-rw-r--r--board/ryu/board.c18
-rw-r--r--common/case_closed_debug.c8
-rw-r--r--include/case_closed_debug.h13
3 files changed, 2 insertions, 37 deletions
diff --git a/board/ryu/board.c b/board/ryu/board.c
index 57e2d2e2ed..0307f3f91b 100644
--- a/board/ryu/board.c
+++ b/board/ryu/board.c
@@ -305,24 +305,6 @@ int extpower_is_present(void)
return gpio_get_level(GPIO_CHGR_ACOK);
}
-/*
- * Disconnect the USB lines from the AP, this enables manual control of the
- * Pericom polarity switch and disconnects the USB 2.0 lines
- */
-void ccd_board_connect(void)
-{
- pi3usb9281_set_pins(0, 0x00);
- pi3usb9281_set_switch_manual(0, 0);
-}
-
-/*
- * Reconnect the USB lines to the AP re-enabling automatic switching
- */
-void ccd_board_disconnect(void)
-{
- pi3usb9281_set_switch_manual(0, 1);
-}
-
void usb_board_connect(void)
{
gpio_set_level(GPIO_USB_PU_EN_L, 0);
diff --git a/common/case_closed_debug.c b/common/case_closed_debug.c
index 270253b50e..a1f8522ccd 100644
--- a/common/case_closed_debug.c
+++ b/common/case_closed_debug.c
@@ -30,10 +30,8 @@ void ccd_set_mode(enum ccd_mode new_mode)
if (new_mode == current_mode)
return;
- if (current_mode != CCD_MODE_DISABLED) {
+ if (current_mode != CCD_MODE_DISABLED)
usb_release();
- ccd_board_disconnect();
- }
current_mode = new_mode;
@@ -43,8 +41,6 @@ void ccd_set_mode(enum ccd_mode new_mode)
*/
usb_console_enable(new_mode == CCD_MODE_ENABLED);
- if (new_mode != CCD_MODE_DISABLED) {
- ccd_board_connect();
+ if (new_mode != CCD_MODE_DISABLED)
usb_init();
- }
}
diff --git a/include/case_closed_debug.h b/include/case_closed_debug.h
index 1884e545d9..5445022ec3 100644
--- a/include/case_closed_debug.h
+++ b/include/case_closed_debug.h
@@ -33,17 +33,4 @@ enum ccd_mode {
*/
void ccd_set_mode(enum ccd_mode new_mode);
-/*
- * Board provided function that should ensure that the debug USB port is ready
- * for use by the case closed debug code. This could mean updating a MUX or
- * switch to disconnect USB from the AP.
- */
-void ccd_board_connect(void);
-
-/*
- * Board provided function that releases the debug USB port, giving it back
- * to the AP.
- */
-void ccd_board_disconnect(void);
-
#endif /* INCLUDE_CASE_CLOSED_DEBUG_H */