From patchwork Thu Aug 29 05:30:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 11120319 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 90185184E for ; Thu, 29 Aug 2019 05:31:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6529F206BB for ; Thu, 29 Aug 2019 05:31:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="jkAex+PU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727267AbfH2Fav (ORCPT ); Thu, 29 Aug 2019 01:30:51 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:57949 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725970AbfH2Fav (ORCPT ); Thu, 29 Aug 2019 01:30:51 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190829053049euoutp01ffe4df29b6fd7e22b73754bcd5b20ac9~-Tbhx5pio2998129981euoutp01z for ; Thu, 29 Aug 2019 05:30:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190829053049euoutp01ffe4df29b6fd7e22b73754bcd5b20ac9~-Tbhx5pio2998129981euoutp01z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1567056649; bh=8i0ZsJoTCw9igACp/Y80+zUSsANQc6ilNqp2fm8mj+w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jkAex+PUGM0UzkGup/lsyzvyFXaXLxmGHIfJEAFDO4/APVdsmRRM+8CsLhjLSN+sb k1BIQCGq9lR++VEoC/J2UdPxKqYpW4az6iNgDU3VAVwD2CzywLW90bdxh+jBdnRpi3 W/YHTd0BynGgOsy/QfFB9tgV1cjZIWuyorR7uITw= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190829053049eucas1p19f2698838b20e78fba38d0b16bf44b71~-TbhGU0TO0697306973eucas1p1p; Thu, 29 Aug 2019 05:30:49 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id AF.1B.04469.803676D5; Thu, 29 Aug 2019 06:30:48 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190829053048eucas1p1f6549a72d7374812b2aa3cf93862794e~-TbgKE0qJ2620626206eucas1p16; Thu, 29 Aug 2019 05:30:48 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190829053047eusmtrp189a30599d35ed8b49a69bd087c6a06f0~-Tbf7y6bG1101011010eusmtrp1E; Thu, 29 Aug 2019 05:30:47 +0000 (GMT) X-AuditID: cbfec7f2-54fff70000001175-7e-5d67630854cf Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id B6.EC.04117.703676D5; Thu, 29 Aug 2019 06:30:47 +0100 (BST) Received: from AMDC2765.DIGITAL.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190829053047eusmtip173d9461db18a05736a4e9e8197ce07ed~-TbfU3H2p1820418204eusmtip1N; Thu, 29 Aug 2019 05:30:47 +0000 (GMT) From: Marek Szyprowski To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Martin Blumenstingl , Marek Szyprowski , Mathias Nyman , Felipe Balbi , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Jochen Sprickerhof , Anand Moon Subject: [PATCH v2 1/2 RESEND] usb: core: phy: add support for PHY calibration Date: Thu, 29 Aug 2019 07:30:27 +0200 Message-Id: <20190829053028.32438-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190829053028.32438-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGKsWRmVeSWpSXmKPExsWy7djP87ocyemxBhsvmlpsnLGe1eJY2xN2 i+bF69kslv69x2hx/vwGdovLu+awWcw4v4/JYtGyVmaLdRtvsVusPXKX3eLYopMsFs2bprA6 8HjsnHWX3ePphMnsHov3vGTy2LSqk81j/9w17B59W1YxemzY8o/F4/MmuQCOKC6blNSczLLU In27BK6My+8b2AoWi1c0r1nI3MD4WLiLkZNDQsBEYtHHDrYuRi4OIYEVjBLN/esYIZwvjBJH d+yDcj4zSqz9upQRpuXgmYPsEInljBK/f59jgms587YXrIpNwFCi620XG4gtIuAgsWTpHbAl zAK7mSX2/nwHlhAWCJCY/e0vO4jNIqAqcfX+JrBmXgFbiT/ve1kh1slLrN5wgBnE5hSwk3jw uhFsm4TAKnaJE9O3s0AUuUj8+rWDDcIWlnh1fAs7hC0jcXpyDwtEQzOjxMNza9khnB5GictN M6A+spY4fPwi0DoOoPs0Jdbv0ocIO0o8OnkLLCwhwCdx460gSJgZyJy0bTozRJhXoqNNCKJa TWLW8XVwaw9euMQMYXtIbG89Dg2hiYwSS2e8YJ7AKD8LYdkCRsZVjOKppcW56anFhnmp5XrF ibnFpXnpesn5uZsYgann9L/jn3Ywfr2UdIhRgINRiYeXIzEtVog1say4MvcQowQHs5II7yOV 1Fgh3pTEyqrUovz4otKc1OJDjNIcLErivNUMD6KFBNITS1KzU1MLUotgskwcnFINjEam001s b0yI/3dn7nzHCZVVbTNyRb+ZVYbc255mLeT65OMMnmAWo9dreGrjc7/E8HtZbrIV0C75teXO AZ4O+QJf2f3f9D43qX/vr01NKN/81e7CXodXtWs+rf+adtqjMErgXuC8f/lyvy9uETM6Urbo +nyddSs+VqY0/NZ1fnXnd7aM8MWcLCWW4oxEQy3mouJEAHvCXI45AwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjkeLIzCtJLcpLzFFi42I5/e/4XV325PRYgyl7TC02zljPanGs7Qm7 RfPi9WwWS//eY7Q4f34Du8XlXXPYLGac38dksWhZK7PFuo232C3WHrnLbnFs0UkWi+ZNU1gd eDx2zrrL7vF0wmR2j8V7XjJ5bFrVyeaxf+4ado++LasYPTZs+cfi8XmTXABHlJ5NUX5pSapC Rn5xia1StKGFkZ6hpYWekYmlnqGxeayVkamSvp1NSmpOZllqkb5dgl7G5fcNbAWLxSua1yxk bmB8LNzFyMkhIWAicfDMQfYuRi4OIYGljBKfep8yQSRkJE5Oa2CFsIUl/lzrYoMo+sQocX7R HEaQBJuAoUTXW5AEJ4eIgJNE59rTYEXMAgeZJS5e3MsOkhAW8JM49+wzWAOLgKrE1fubwGxe AVuJP+97oTbIS6zecIAZxOYUsJN48LoR7AohoJpXNx8wT2DkW8DIsIpRJLW0ODc9t9hIrzgx t7g0L10vOT93EyMwDrYd+7llB2PXu+BDjAIcjEo8vAnJabFCrIllxZW5hxglOJiVRHgfqaTG CvGmJFZWpRblxxeV5qQWH2I0BTpqIrOUaHI+MEbzSuINTQ3NLSwNzY3Njc0slMR5OwQOxggJ pCeWpGanphakFsH0MXFwSjUw6qeGfBA72GEVzBxTu4z3v6mUmPvNEK0zB+4YcOi8nbd7H/NR 53dKF2dWznWZZ353xe+dd4qVlax1EmctaaycaXQ2dM3CXzHm0StWv1jBvf+hre/yVe4TWhde NFh50CmSK66ogZVR7lGdm9R7hm/cUz51299z1el+9rDIPPHIlwl5kW+vCOupK7EUZyQaajEX FScCAEJBmrKZAgAA X-CMS-MailID: 20190829053048eucas1p1f6549a72d7374812b2aa3cf93862794e X-Msg-Generator: CA X-RootMTR: 20190829053048eucas1p1f6549a72d7374812b2aa3cf93862794e X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190829053048eucas1p1f6549a72d7374812b2aa3cf93862794e References: <20190829053028.32438-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Some PHYs (for example Exynos5 USB3.0 DRD PHY) require calibration to be done after every USB HCD reset. Generic PHY framework has been already extended with phy_calibrate() function in commit 36914111e682 ("drivers: phy: add calibrate method"). This patch adds support for it to generic PHY handling code in USB HCD core. Signed-off-by: Marek Szyprowski Tested-by: Anand Moon Tested-by: Jochen Sprickerhof --- drivers/usb/core/hcd.c | 7 +++++++ drivers/usb/core/phy.c | 21 +++++++++++++++++++++ drivers/usb/core/phy.h | 1 + 3 files changed, 29 insertions(+) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 88533938ce19..b89936c1df23 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -2291,6 +2291,9 @@ int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg) hcd->state = HC_STATE_RESUMING; status = hcd->driver->bus_resume(hcd); clear_bit(HCD_FLAG_WAKEUP_PENDING, &hcd->flags); + if (status == 0) + status = usb_phy_roothub_calibrate(hcd->phy_roothub); + if (status == 0) { struct usb_device *udev; int port1; @@ -2864,6 +2867,10 @@ int usb_add_hcd(struct usb_hcd *hcd, } hcd->rh_pollable = 1; + retval = usb_phy_roothub_calibrate(hcd->phy_roothub); + if (retval) + goto err_hcd_driver_setup; + /* NOTE: root hub and controller capabilities may not be the same */ if (device_can_wakeup(hcd->self.controller) && device_can_wakeup(&hcd->self.root_hub->dev)) diff --git a/drivers/usb/core/phy.c b/drivers/usb/core/phy.c index 7580493b867a..fb1588e7c282 100644 --- a/drivers/usb/core/phy.c +++ b/drivers/usb/core/phy.c @@ -151,6 +151,27 @@ int usb_phy_roothub_set_mode(struct usb_phy_roothub *phy_roothub, } EXPORT_SYMBOL_GPL(usb_phy_roothub_set_mode); +int usb_phy_roothub_calibrate(struct usb_phy_roothub *phy_roothub) +{ + struct usb_phy_roothub *roothub_entry; + struct list_head *head; + int err; + + if (!phy_roothub) + return 0; + + head = &phy_roothub->list; + + list_for_each_entry(roothub_entry, head, list) { + err = phy_calibrate(roothub_entry->phy); + if (err) + return err; + } + + return 0; +} +EXPORT_SYMBOL_GPL(usb_phy_roothub_calibrate); + int usb_phy_roothub_power_on(struct usb_phy_roothub *phy_roothub) { struct usb_phy_roothub *roothub_entry; diff --git a/drivers/usb/core/phy.h b/drivers/usb/core/phy.h index dad564e2d2d4..20a267cd986b 100644 --- a/drivers/usb/core/phy.h +++ b/drivers/usb/core/phy.h @@ -18,6 +18,7 @@ int usb_phy_roothub_exit(struct usb_phy_roothub *phy_roothub); int usb_phy_roothub_set_mode(struct usb_phy_roothub *phy_roothub, enum phy_mode mode); +int usb_phy_roothub_calibrate(struct usb_phy_roothub *phy_roothub); int usb_phy_roothub_power_on(struct usb_phy_roothub *phy_roothub); void usb_phy_roothub_power_off(struct usb_phy_roothub *phy_roothub); From patchwork Thu Aug 29 05:30:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 11120315 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DDD4D1395 for ; Thu, 29 Aug 2019 05:30:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C0BBD22CED for ; Thu, 29 Aug 2019 05:30:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="kXHa+xN/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727386AbfH2Faw (ORCPT ); Thu, 29 Aug 2019 01:30:52 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:57957 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726036AbfH2Faw (ORCPT ); Thu, 29 Aug 2019 01:30:52 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190829053050euoutp01cf2056f67c3179739bcda4fd4f965300~-TbiJa5bM3272232722euoutp01B for ; Thu, 29 Aug 2019 05:30:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190829053050euoutp01cf2056f67c3179739bcda4fd4f965300~-TbiJa5bM3272232722euoutp01B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1567056650; bh=I6N6bv0h1HrvQoG0yNZnRE9a99bMMNihpEquu9JqhQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kXHa+xN/2qxCZKNYzNumaxwmpJ7v3/Qslsqsh99b9ZS3Gi/iy12+01mV9njdDOgKf yC3CeZAqk3lCR3tbV8C8MqvIb0d49vQLTjSXLTM5ZBDr6bD2QFUDV3Xp9dBKkilqT/ ldp7ww5lGxn4UzoT2snqa/0Hph9tO++1Qu0zWtO4= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190829053049eucas1p2792bffb88ddefd299427d66552b56d7b~-Tbhhg-Cq0680006800eucas1p2g; Thu, 29 Aug 2019 05:30:49 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id C7.0B.04374.903676D5; Thu, 29 Aug 2019 06:30:49 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190829053048eucas1p23a263403490acf3ef91c02b1c851b03f~-TbguEljJ2559925599eucas1p23; Thu, 29 Aug 2019 05:30:48 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190829053048eusmtrp1df1c544086b3e6aa05e50137b33c9f9a~-TbgfmAjg1101011010eusmtrp1G; Thu, 29 Aug 2019 05:30:48 +0000 (GMT) X-AuditID: cbfec7f5-4f7ff70000001116-5c-5d676309d4f0 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id A7.EC.04117.803676D5; Thu, 29 Aug 2019 06:30:48 +0100 (BST) Received: from AMDC2765.DIGITAL.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190829053047eusmtip119ea01e8a8c11a679e4aa502c977db42~-Tbf5eBLi1911419114eusmtip1L; Thu, 29 Aug 2019 05:30:47 +0000 (GMT) From: Marek Szyprowski To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Martin Blumenstingl , Marek Szyprowski , Mathias Nyman , Felipe Balbi , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Jochen Sprickerhof , Anand Moon Subject: [PATCH v2 2/2 RESEND] usb: dwc3: remove generic PHY calibrate() calls Date: Thu, 29 Aug 2019 07:30:28 +0200 Message-Id: <20190829053028.32438-3-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190829053028.32438-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSa0hTYRjHfXfOds7M6WkKPll4WSokqUkGBzJR6sMJhPwSUio59XjLTdlR 04JwSlrTykvhWil5S5n3MVxampluhuEsFUU0LJKuRuGFpJScR+vb73mf///5v+/DS2LSRqEb marMYlVKebpMZI93m9fH/MUJybFHflRJ6S5th5A2F30g6ML6DhHduPEW0VZrJ0FP9D4Q0Vpr v4Cue3QNo9u7Zgm6bWieoM11L3G60HBHGObA9OjmCWaxrJJg6p9+FjAG/Q0R86y6lWBuGfWI 6TRu4syywT2SPG8fksimp+awqsDQOPuUm6b7KLNvT+7GT4soH82INUhMAhUMk0VWTIPsSSnV jGB+pE3IFysI1K++7RTLCAaa1rFdS/nvyR1LE4KR2TnRP0tLwySyqURUEGiWNCIbu1Bh0NDI izDqCQZ969+3G85UJHRo1dtjccoHNNVrAhtLqBOwuFqG83Ee0NI5sK0RU6Gw8FUtsA0CSk/A lKZnR3QKVlo/CXh2hi8WI8HzARitLMV5QyGCd2NtBF+UIpgo0CJedRxeWF5vPZXcut8h6OgN tCFQ4TDdk8OjI8ws7bWJsS2s6K7C+GMJXC+S8jN8QWdp/5f6fPzNzrYYME/X4vyCyhH8atVj ZchD9z/rIUJ65Mpmc4pkljuqZC8FcHIFl61MDkjIUBjQ1ucZ3bSsPkb9f+IHEUUimYMkLiEp ViqU53B5ikEEJCZzkbz3ZmOlkkR53mVWlXFBlZ3OcoNoP4nLXCVX7BaipVSyPIu9yLKZrGq3 KyDFbvno2FXPxsTxONx8xjtCHDNndM8ucdKGOHn4nyOLoyrqdWLTdMlU9JhaWXfQmY1P4rp8 FR+jimtqfWBkXX2yQj9snUhzTKBMXrPDyP30RoGp1DOv3M6vc7R5n2+NLlU+qi5baz6rq/BI G/LabDicGxBzL9jgH146d3umLQLC78pwLkUe5IepOPlfVgZwFTgDAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjkeLIzCtJLcpLzFFi42I5/e/4XV2O5PRYg0cPZS02zljPanGs7Qm7 RfPi9WwWS//eY7Q4f34Du8XlXXPYLGac38dksWhZK7PFuo232C3WHrnLbnFs0UkWi+ZNU1gd eDx2zrrL7vF0wmR2j8V7XjJ5bFrVyeaxf+4ado++LasYPTZs+cfi8XmTXABHlJ5NUX5pSapC Rn5xia1StKGFkZ6hpYWekYmlnqGxeayVkamSvp1NSmpOZllqkb5dgl5G7/bZjAV7uSv+fjzO 1sB4g7OLkZNDQsBEYuLvK8xdjFwcQgJLGSW+N8xmgkjISJyc1sAKYQtL/LnWxQZR9IlR4sa6 HWBFbAKGEl1vQRKcHCICThKda0+DFTELHGSWuHhxLztIQljAT2Lno0awSSwCqhJdc7+BNfMK 2Eo8/TqBBWKDvMTqDQeYQWxOATuJB68bwWqEgGpe3XzAPIGRbwEjwypGkdTS4tz03GIjveLE 3OLSvHS95PzcTYzAONh27OeWHYxd74IPMQpwMCrx8CYkp8UKsSaWFVfmHmKU4GBWEuF9pJIa K8SbklhZlVqUH19UmpNafIjRFOioicxSosn5wBjNK4k3NDU0t7A0NDc2NzazUBLn7RA4GCMk kJ5YkpqdmlqQWgTTx8TBKdXAyH9E9ssSjYyVX9Rr9Owsu7oqqtqEn4cyuCyVu3VfZsLs+IaL 5ZlxgvmPS4397oYo3pxo4u7wxzSoeXsUU4KEb8r8I7oR1ecNuz5ce+xgJPr0c+ZztwjuKvs4 zsZw9pZWxtKmruUJRQyMPQ+U/Ge2+36akjc7nOkyw9zzl1bxpB46IxK5qVWJpTgj0VCLuag4 EQAykg+amQIAAA== X-CMS-MailID: 20190829053048eucas1p23a263403490acf3ef91c02b1c851b03f X-Msg-Generator: CA X-RootMTR: 20190829053048eucas1p23a263403490acf3ef91c02b1c851b03f X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190829053048eucas1p23a263403490acf3ef91c02b1c851b03f References: <20190829053028.32438-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Calls to USB2 generic PHY calibrate() method has been moved to HCD core, which now successfully handles generic PHYs and their calibration after every HCD reset. This fixes all the timing issues related to PHY calibration done directly from DWC3 driver: incorrect operation after system suspend/resume or USB3.0 detection failure when XHCI-plat driver compiled as separate module. Signed-off-by: Marek Szyprowski Tested-by: Anand Moon Tested-by: Jochen Sprickerhof Acked-by: Felipe Balbi --- drivers/usb/dwc3/core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index c9bb93a2c81e..7dd6d419254d 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -168,7 +168,6 @@ static void __dwc3_set_mode(struct work_struct *work) otg_set_vbus(dwc->usb2_phy->otg, true); phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_HOST); phy_set_mode(dwc->usb3_generic_phy, PHY_MODE_USB_HOST); - phy_calibrate(dwc->usb2_generic_phy); } break; case DWC3_GCTL_PRTCAP_DEVICE: @@ -1166,7 +1165,6 @@ static int dwc3_core_init_mode(struct dwc3 *dwc) dev_err(dev, "failed to initialize host\n"); return ret; } - phy_calibrate(dwc->usb2_generic_phy); break; case USB_DR_MODE_OTG: INIT_WORK(&dwc->drd_work, __dwc3_set_mode);