aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorChunfeng Yun2022-05-27 09:52:09 +0800
committerMarek Vasut2022-06-07 09:55:57 +0200
commitfe8e8af36c46dd6381d64b174bd6b5e1283a5294 (patch)
tree6840308d2c3673c958377013cb0ab2e2b9c6606d /drivers/usb/host
parent8f527342db4160a1f030de6fe4a1591787cce65a (diff)
usb: xhci-mtk: disable all ports when disable host controller
This is used to avoid the ports status of IPPC being brought in kernel stage, it may cause ports error especially when the xhci controller is a component of dual-role controller. Reported-by: Yun-Chien Yu <yun-chien.yu@mediatek.com> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/xhci-mtk.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 18b4f55d896..3838a990ec3 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -122,11 +122,13 @@ static int xhci_mtk_host_disable(struct mtk_xhci *mtk)
/* power down all u3 ports */
for (i = 0; i < mtk->num_u3ports; i++)
- setbits_le32(mtk->ippc + IPPC_U3_CTRL(i), CTRL_U3_PORT_PDN);
+ setbits_le32(mtk->ippc + IPPC_U3_CTRL(i),
+ CTRL_U3_PORT_PDN | CTRL_U3_PORT_DIS);
/* power down all u2 ports */
for (i = 0; i < mtk->num_u2ports; i++)
- setbits_le32(mtk->ippc + IPPC_U2_CTRL(i), CTRL_U2_PORT_PDN);
+ setbits_le32(mtk->ippc + IPPC_U2_CTRL(i),
+ CTRL_U2_PORT_PDN | CTRL_U2_PORT_DIS);
/* power down host ip */
setbits_le32(mtk->ippc + IPPC_IP_PW_CTRL1, CTRL1_IP_HOST_PDN);