diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2019-12-02 17:37:03 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-07 02:51:19 +0000 |
commit | 41acb78745d413f0db6dfc95c00276b622802be7 (patch) | |
tree | 02e355b5e3a4bf9fd6b0fabdedd1fd67af33b53d /driver | |
parent | 911c5ea4fbdce8f45e5cce635d2068bd1e85be8b (diff) | |
download | chrome-ec-41acb78745d413f0db6dfc95c00276b622802be7.tar.gz |
volteer: Enable Burnisde Bridge retimer
BUG=b:145560203
BRANCH=none
TEST=BB retimer can communicate via I2C
Change-Id: Ibc9b61d909ff1d07794e13927796e26aa1e53e03
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1947427
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/retimer/bb_retimer.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/driver/retimer/bb_retimer.c b/driver/retimer/bb_retimer.c index 9a0caf5c4e..64112b6769 100644 --- a/driver/retimer/bb_retimer.c +++ b/driver/retimer/bb_retimer.c @@ -86,14 +86,11 @@ static void bb_retimer_power_handle(int port, int on_off) gpio_set_level(retimer->force_power_gpio, 1); /* - * If BB retimer NVM is shared between two ports allow 40ms - * time for both retimers to be initialized. Else allow 20ms - * to initialize. + * If BB retimer NVM is shared between multiple ports, allow + * 40ms time for all the retimers to be initialized. + * Else allow 20ms to initialize. */ - if ((USB_PORT0_BB_RETIMER_SHARED_NVM && - (port == TYPE_C_PORT_0)) || - (USB_PORT1_BB_RETIMER_SHARED_NVM && - (port == TYPE_C_PORT_1))) + if (retimer->shared_nvm) msleep(40); else msleep(20); @@ -250,7 +247,8 @@ static int console_command_bb_retimer(int argc, char **argv) /* Get port number */ port = strtoi(argv[1], &e, 0); - if (*e || port < 0 || port > board_get_usb_pd_port_count()) + if (*e || port < 0 || port > board_get_usb_pd_port_count() || + !usb_retimers[port].driver) return EC_ERROR_PARAM1; /* Validate r/w selection */ |