diff options
author | Poornima Tom <poornima.tom@intel.com> | 2021-01-15 12:12:59 +0530 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-20 11:17:57 +0000 |
commit | 8014ff8ddf2658fb82ef38a43c7114ee7a202564 (patch) | |
tree | 745a92ee22014d222b83e6e2ac40928f3a4b9440 | |
parent | 8df726849d8d406ae011e014d899867b9c27685b (diff) | |
download | chrome-ec-8014ff8ddf2658fb82ef38a43c7114ee7a202564.tar.gz |
adlrvp: Remove Mutex from bb_retimer_powerhandle()
The mutex was introduced to lock the retimer SPI access in shared SPI
model. With the latest BB retimer driver, I2C retry is introduced to
fasten the SPI access hence removed the mutex and additional delay.
BRANCH=none
BUG=none
TEST=Tested on ADLRVP with TBT dock.
Signed-off-by: Poornima Tom <poornima.tom@intel.com>
Change-Id: I7c965ff2b2d880f22ce0bbd57245bf52a8bf5dd5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2631890
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: caveh jalali <caveh@chromium.org>
-rw-r--r-- | board/adlrvpp_ite/adlrvp.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/board/adlrvpp_ite/adlrvp.c b/board/adlrvpp_ite/adlrvp.c index d9620c5908..a9aac4eb0a 100644 --- a/board/adlrvpp_ite/adlrvp.c +++ b/board/adlrvpp_ite/adlrvp.c @@ -21,9 +21,6 @@ #define CPRINTS(format, args...) cprints(CC_COMMAND, format, ## args) #define CPRINTF(format, args...) cprintf(CC_COMMAND, format, ## args) -/* Mutex for BB retimer shared NVM access */ -static struct mutex bb_nvm_mutex; - /* TCPC AIC GPIO Configuration */ const struct tcpc_aic_gpio_config_t tcpc_aic_gpios[] = { [TYPE_C_PORT_0] = { @@ -205,13 +202,6 @@ __override void bb_retimer_power_handle(const struct usb_mux *me, int on_off) { /* Handle retimer's power domain.*/ if (on_off) { - /* - * BB retimer NVM can be shared between multiple ports, hence - * lock enabling the retimer until the current retimer request - * is complete. - */ - mutex_lock(&bb_nvm_mutex); - pca9675_update_pins(me->usb_port, TCPC_AIC_IOE_BB_RETIMER_LS_EN, 0); @@ -225,10 +215,11 @@ __override void bb_retimer_power_handle(const struct usb_mux *me, int on_off) pca9675_update_pins(me->usb_port, TCPC_AIC_IOE_BB_RETIMER_RST, 0); - /* Allow 20ms time for the retimer to be initialized. */ - msleep(20); + /* Allow 1ms time for the retimer to power up lc_domain + * which powers I2C controller within retimer + */ + msleep(1); - mutex_unlock(&bb_nvm_mutex); } else { pca9675_update_pins(me->usb_port, 0, TCPC_AIC_IOE_BB_RETIMER_RST); |