[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1599207340-4673-2-git-send-email-chunfeng.yun@mediatek.com>
Date: Fri, 4 Sep 2020 16:15:38 +0800
From: Chunfeng Yun <chunfeng.yun@...iatek.com>
To: Zhanyong Wang <zhanyong.wang@...iatek.com>
CC: <linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>,
Chunfeng Yun <chunfeng.yun@...iatek.com>
Subject: [RFC PATCH v2 2/4] usb: xhci-mtk: add mt8192 wakeup
From: Zhanyong Wang <zhanyong.wang@...iatek.com>
need to add wakeup solution as V3
since not support presently.
Signed-off-by: Zhanyong Wang <zhanyong.wang@...iatek.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@...iatek.com>
---
v2: no changes
---
drivers/usb/host/xhci-mtk.c | 9 +++++++++
1 file changed, 9 insertions(+)
mode change 100644 => 100755 drivers/usb/host/xhci-mtk.c
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
old mode 100644
new mode 100755
index 4311d4c..d95221f
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -68,9 +68,13 @@
#define SSC_IP_SLEEP_EN BIT(4)
#define SSC_SPM_INT_EN BIT(1)
+/* mt8192 etc */
+#define SSC_IP_SLEEP_EN_V3 BIT(6)
+
enum ssusb_uwk_vers {
SSUSB_UWK_V1 = 1,
SSUSB_UWK_V2,
+ SSUSB_UWK_V3,
};
static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
@@ -305,6 +309,11 @@ static void usb_wakeup_ip_sleep_set(struct xhci_hcd_mtk *mtk, bool enable)
msk = SSC_IP_SLEEP_EN | SSC_SPM_INT_EN;
val = enable ? msk : 0;
break;
+ case SSUSB_UWK_V3:
+ reg = mtk->uwk_reg_base + PERI_SSUSB_SPM_CTRL;
+ msk = SSC_IP_SLEEP_EN_V3 | SSC_SPM_INT_EN;
+ val = enable ? msk : 0;
+ break;
default:
return;
}
--
1.9.1
Powered by blists - more mailing lists