Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1740563

[PATCH 3/9] usb: xhci-mtk: check clock stability of U3_MAC

Path csiph.com!news.mixmin.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Chunfeng Yun <chunfeng.yun@mediatek.com>
Newsgroups linux.kernel
Subject [PATCH 3/9] usb: xhci-mtk: check clock stability of U3_MAC
Date Wed, 27 Sep 2017 11:30:02 +0200
Message-ID <uugPg-t2-31@gated-at.bofh.it> (permalink)
References <uugPg-t2-19@gated-at.bofh.it>
X-Uuid 9c45d4dcd74c4397960a6a8623137209-20170927
X-Mailer git-send-email 1.7.9.5
MIME-Version 1.0
Content-Type text/plain
X-Mtk N
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 33
Organization linux.* mail to news gateway
X-Original-Cc Matthias Brugger <matthias.bgg@gmail.com>, Mark Rutland <mark.rutland@arm.com>, Ian Campbell <ijc+devicetree@hellion.org.uk>, Chunfeng Yun <chunfeng.yun@mediatek.com>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-usb@vger.kernel.org>, <linux-mediatek@lists.infradead.org>, <devicetree@vger.kernel.org>
X-Original-Date Wed, 27 Sep 2017 17:22:59 +0800
X-Original-Message-ID <afc5cff346c5a349177990999df3dd7604966de4.1506503879.git.chunfeng.yun@mediatek.com>
X-Original-References <994382d16d6bdc0f3d7c11b22f1710252e056e34.1506503879.git.chunfeng.yun@mediatek.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1740563

Show key headers only | View raw


This is useful to find out the root cause when the Super Speed doesn't
work. Such as when the T-PHY is switched to PCIe or SATA, and affects
Super Speed function, the check will fail.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/usb/host/xhci-mtk.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index 9502ca4..7a92bb7 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -43,6 +43,7 @@
 
 /* ip_pw_sts1 register */
 #define STS1_IP_SLEEP_STS	BIT(30)
+#define STS1_U3_MAC_RST	BIT(16)
 #define STS1_XHCI_RST		BIT(11)
 #define STS1_SYS125_RST	BIT(10)
 #define STS1_REF_RST		BIT(8)
@@ -125,6 +126,9 @@ static int xhci_mtk_host_enable(struct xhci_hcd_mtk *mtk)
 	check_val = STS1_SYSPLL_STABLE | STS1_REF_RST |
 			STS1_SYS125_RST | STS1_XHCI_RST;
 
+	if (mtk->num_u3_ports)
+		check_val |= STS1_U3_MAC_RST;
+
 	ret = readl_poll_timeout(&ippc->ip_pw_sts1, value,
 			  (check_val == (value & check_val)), 100, 20000);
 	if (ret) {
-- 
1.7.9.5

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 3/9] usb: xhci-mtk: check clock stability of U3_MAC Chunfeng Yun <chunfeng.yun@mediatek.com> - 2017-09-27 11:30 +0200

csiph-web