summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2017-07-31 18:28:06 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-08-01 22:59:48 -0700
commit577880a1b752924278b44dedff0d7649921b9d49 (patch)
treeca8780095a7f36762060bce27c2fc429c4818a30 /board
parent3f2a017f261055145a9fdc91a4ebd70cc9577b21 (diff)
downloadchrome-ec-577880a1b752924278b44dedff0d7649921b9d49.tar.gz
cr50: stop using AP PHY
Remove the code switching between PHY0 and PHY1. We now only use the CCD PHY on all boards. BUG=b:36488273 BRANCH=cr50 TEST=ccd works fine. cr50 usb doesn't show up on the AP. You cannot switch the PHY on cr50. Change-Id: I6ff641af9d7129daa8592f952f9df97c3862395b Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/595201 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/cr50/board.h1
-rw-r--r--board/cr50/rdd.c55
2 files changed, 0 insertions, 56 deletions
diff --git a/board/cr50/board.h b/board/cr50/board.h
index 5b1b541653..665361b125 100644
--- a/board/cr50/board.h
+++ b/board/cr50/board.h
@@ -90,7 +90,6 @@
#define CONFIG_USB_CONSOLE
#define CONFIG_USB_I2C
#define CONFIG_USB_INHIBIT_INIT
-#define CONFIG_USB_SELECT_PHY
#define CONFIG_USB_SPI
#define CONFIG_USB_SERIALNO
#define DEFAULT_SERIALNO "0"
diff --git a/board/cr50/rdd.c b/board/cr50/rdd.c
index 52082d56f4..74ea87eff0 100644
--- a/board/cr50/rdd.c
+++ b/board/cr50/rdd.c
@@ -21,7 +21,6 @@
static int keep_ccd_enabled;
static int enable_usb_wakeup;
-static int usb_is_initialized;
struct uart_config {
const char *name;
@@ -178,58 +177,6 @@ void ccd_mode_pin_changed(int pin_level)
configure_ccd(enable);
}
-void ccd_phy_init(int enable_ccd)
-{
- /*
- * For boards that have one phy connected to the AP and one to the
- * external port PHY0 is for the AP and PHY1 is for CCD.
- */
- uint32_t which_phy = enable_ccd ? USB_SEL_PHY1 : USB_SEL_PHY0;
-
- /*
- * TODO: if both PHYs are connected to the external port select the
- * PHY based on the detected polarity
- */
- usb_select_phy(which_phy);
-
- /*
- * If the usb is going to be initialized on the AP PHY, but the AP is
- * off, wait until HOOK_CHIPSET_RESUME to initialize usb.
- */
- if (!enable_ccd && device_get_state(DEVICE_AP) != DEVICE_STATE_ON) {
- usb_is_initialized = 0;
- return;
- }
-
- /*
- * If the board has the non-ccd phy connected to the AP initialize the
- * phy no matter what. Otherwise only initialize the phy if ccd is
- * enabled.
- */
- if (board_has_ap_usb() || enable_ccd) {
- usb_init();
- usb_is_initialized = 1;
- }
-}
-
-void disable_ap_usb(void)
-{
- if (board_has_ap_usb() && !ccd_is_enabled() && usb_is_initialized) {
- usb_release();
- usb_is_initialized = 0;
- }
-}
-DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, disable_ap_usb, HOOK_PRIO_DEFAULT);
-
-void enable_ap_usb(void)
-{
- if (board_has_ap_usb() && !ccd_is_enabled() && !usb_is_initialized) {
- usb_is_initialized = 1;
- usb_init();
- }
-}
-DECLARE_HOOK(HOOK_CHIPSET_RESUME, enable_ap_usb, HOOK_PRIO_DEFAULT);
-
static void rdd_ccd_change_hook(void)
{
if (uart_tx_is_connected(UART_AP) &&
@@ -251,8 +198,6 @@ static void rdd_ccd_change_hook(void)
/* Not transmitting to EC, but allowed now */
uartn_tx_connect(UART_EC);
}
-
-
}
DECLARE_HOOK(HOOK_CCD_CHANGE, rdd_ccd_change_hook, HOOK_PRIO_DEFAULT);