From patchwork Fri Jul 19 08:13:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 169234 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp3525743ilk; Fri, 19 Jul 2019 01:13:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxirpYZfogQhZjBOd0Ye7yVwuZuLS/nz8Yz4mDAxS6wJ3Q3i82CnYSlOVklQHoc640lXzdv X-Received: by 2002:a17:902:7088:: with SMTP id z8mr56319783plk.125.1563524018224; Fri, 19 Jul 2019 01:13:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563524018; cv=none; d=google.com; s=arc-20160816; b=P3gd8kqibGNfMGVMSTQrhcClae66WXRVhcyL6WrXMvC/GgbQkdoNqWrrsunlpffKpw Y5LZc4hjlksR/jfTvvZbWG7TDHSDGLIihuKDsLtmgisBSwmHHcrad+dhkF+HRKe8gUyr InsVWVkXtF7Lr9IOt7Nu0/7yHtGOUbMTAvUrIZShi03/OctdGMHTvLMvMuF7CGOv/NG6 hwGSkJ6Hun298CBsNRVdv6LQnuzL8NAew29F514RZCUvuhkyypZ+OFJQkSR/P8rsMwd5 n6HVwW6pIG4ZCkmHGuS3AIDMyffie0pYPuuWrW70n5gL6FsRq3QxHFxnNp7//WxtlS8F p61A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=drg5AOx0OUTEFNPddGl8KS3mvIQGIebASAgTyhQFOYY=; b=f2dR1hAH8Tsth4Czr8+bjL2BBh8xspWn79J4NnJKVQQ4+tRpFnBNOtyADQF7ZVHnya ZtRisMgvd8X1GNpMX+CtmWAKDhKBz/VbhTdChPFx/xG6UPxsvjRi7K/hgi3yFR0DZ4K8 kK52b+iU8Cq9j1tegMM5MBNcyx0NdXuX9uHkvOHRvwwaq1Z+4/6KV3ZOR156Us1H/s8v 44dwTlDuh8F98SToHwfFpKMghPAC+bAxrM5+RIeiOhWY16SsoZtIpjAYqCmA3c6Ri9ej nzJpu48hM0H9dihAseMOl8dTEwz0+ex0whzy48zhHYeQoShX01Y+unk0mODhWv62sJQp blYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=b2PGbYAb; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g13si403419pfo.22.2019.07.19.01.13.38; Fri, 19 Jul 2019 01:13:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=b2PGbYAb; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726509AbfGSINh (ORCPT + 3 others); Fri, 19 Jul 2019 04:13:37 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:34738 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726077AbfGSINh (ORCPT ); Fri, 19 Jul 2019 04:13:37 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190719081336euoutp01b5b65469e6025685cf6643d2c424393b~ywM8ajb8s1022110221euoutp01i for ; Fri, 19 Jul 2019 08:13:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190719081336euoutp01b5b65469e6025685cf6643d2c424393b~ywM8ajb8s1022110221euoutp01i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1563524016; bh=drg5AOx0OUTEFNPddGl8KS3mvIQGIebASAgTyhQFOYY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b2PGbYAbRFFvpouRZpOauHV+NF7L+jEx7ktGC68JZq6rY6coYbGma7nAnSzEWm7DQ IuTczRrD+KuWE4p+8h1CkUVG2RivaILppSXASMH7PiWZmFAMdvPGrOg6SOFeNVHJlj lt0rd28GCQw7vgxJTy+2U9H4sspIxL4tyrtD3bhc= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190719081335eucas1p1870db09343e0104a6690a0a246c78e2e~ywM7qcup42868428684eucas1p1X; Fri, 19 Jul 2019 08:13:35 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id C6.D8.04298.FAB713D5; Fri, 19 Jul 2019 09:13:35 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190719081334eucas1p1fd614e56c1ec0dfa654d0bb77f17ba5d~ywM6tFXO82473624736eucas1p1u; Fri, 19 Jul 2019 08:13:34 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190719081334eusmtrp2e4ca084ef0679af6a6f0c14cec324c81~ywM6jDSiK3201232012eusmtrp2H; Fri, 19 Jul 2019 08:13:34 +0000 (GMT) X-AuditID: cbfec7f2-f13ff700000010ca-25-5d317baff1c7 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id EE.EE.04146.EAB713D5; Fri, 19 Jul 2019 09:13:34 +0100 (BST) Received: from AMDC2765.DIGITAL.local (unknown [106.120.51.73]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190719081333eusmtip2e227f34779f0b92d208bf023e8e626ce~ywM6DCQNQ3189331893eusmtip20; Fri, 19 Jul 2019 08:13:33 +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 , Marek Szyprowski , Mathias Nyman , Felipe Balbi , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Jochen Sprickerhof , Anand Moon Subject: [PATCH v2 2/2] usb: dwc3: remove generic PHY calibrate() calls Date: Fri, 19 Jul 2019 10:13:26 +0200 Message-Id: <20190719081326.9347-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190719081212.9249-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0WSe0hTYRjG/Xa2c85Wk+O0/LBIWFYUeYOIQy0xCjrhPxIklUquPKnkpuyo af4jSlJmoeJlLdPhrZy56Royl2VauNJ0XnHOCxZlaJmULopM2/Es++/3Pe/zfC88vDgi0Qj8 8CRlGq1SypOlqIjf1vNrINCQHRobUmjeRraqDQKyJ/8DRubVGlCy/s8MIG22FowcsVSipNr2 nEfWNNxASH2rAyObX027fMZSQfgWql0zjVG1HfM8yqi7hVKdDx5j1F2TDlAtpjU+tWzcFYld EMni6eSkDFoVHBYnSrxXd0eQqhVl/qjJRXNAL14AcBwSh+CnRhcKcQnxCMD3o7sLgMjFKwCW fJ4G3GMZQOfSbYx1sYFxfZWAGzwEcEZt4m1GptrZiRBHiVBYsFiAsuxDhMO6+imUNSHEOg9W 2F9vmLyJU9BR3rXBfGIP7Bwq57EsJmRwtanWvc4fNrW8QFgWEsdgUY4DYz+CRBU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 UWlOavEhRlOgoyYyS4km5wPjMa8k3tDU0NzC0tDc2NzYzEJJnLdD4GCMkEB6YklqdmpqQWoR TB8TB6dUA2P/Oz0ZnbWNF76+OeYW8eGCmeLeQBuhezwh/txHxZ//e2N9VT3JLa/8wX1O7s0h J9PfBk9oW1l5ImtVt+W5v+ybbz++xa6z/rT8IhfhJzzy3gdmfBDSvjhRp6VxDldZnOMTkb0S Fn3eku8VDU+Hq9l69HBkf+Pdb78jP7v75SbnuHuLLVd91lJiKc5INNRiLipOBAA7sX+QjwIA AA== X-CMS-MailID: 20190719081334eucas1p1fd614e56c1ec0dfa654d0bb77f17ba5d X-Msg-Generator: CA X-RootMTR: 20190719081334eucas1p1fd614e56c1ec0dfa654d0bb77f17ba5d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190719081334eucas1p1fd614e56c1ec0dfa654d0bb77f17ba5d References: <20190719081212.9249-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 --- drivers/usb/dwc3/core.c | 2 -- 1 file changed, 2 deletions(-) -- 2.17.1 Tested-by: Anand Moon Tested-by: Jochen Sprickerhof 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);