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: 11120317 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 8838A14DE for ; Thu, 29 Aug 2019 05:30:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 68D4622CED for ; Thu, 29 Aug 2019 05:30:56 +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 S1726009AbfH2Faz (ORCPT ); Thu, 29 Aug 2019 01:30:55 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:44688 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727340AbfH2Faw (ORCPT ); Thu, 29 Aug 2019 01:30:52 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190829053050euoutp02a21402fcafb7fa1b3c98348372311eab~-TbiK6UKI3210332103euoutp02S for ; Thu, 29 Aug 2019 05:30:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190829053050euoutp02a21402fcafb7fa1b3c98348372311eab~-TbiK6UKI3210332103euoutp02S 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 KyDFbvno2FXPxsTxONx8xjtCHDNndM8ucdKGOHn4nyO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1p23a263403490acf3ef91c02b1c851b03f 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-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@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);