[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1608629682-8535-2-git-send-email-chunfeng.yun@mediatek.com>
Date: Tue, 22 Dec 2020 17:34:39 +0800
From: Chunfeng Yun <chunfeng.yun@...iatek.com>
To: Ikjoon Jang <ikjn@...omium.org>
CC: Chunfeng Yun <chunfeng.yun@...iatek.com>,
Tianping Fang <tianping.fang@...iatek.com>,
Zhanyong Wang <zhangyong.wang@...iatek.com>,
<linux-mediatek@...ts.infradead.org>, <linux-usb@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
Zhanyong Wang <zhanyong.wang@...iatek.com>
Subject: [RFC PATCH v3 2/5] 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~v3: 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 8f321f39ab96..565ce4c16206
--- 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;
}
--
2.18.0
Powered by blists - more mailing lists