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: 172520 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1728767ily; Wed, 28 Aug 2019 22:30:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxV4Hi/U3g4asBMGHIf4nqr1F/gjiOi2jih0bb2/kGNyoLLApyribw9tOAoxNN0Vl5ZdP7i X-Received: by 2002:a63:40a:: with SMTP id 10mr6750050pge.317.1567056654582; Wed, 28 Aug 2019 22:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567056654; cv=none; d=google.com; s=arc-20160816; b=pCDcLR+2bvVRTtqlrGBPgHaq+paYItMSabKKl4FUqdcWOZPD0rAWIpJw9KX5spbhBh Iuh3gJ+PCOWgWnjxc0/y5/3vTsNtLHR9RzLRz48Qc6UyDxNhezaBGRK5UKX9daxlYkap onagxvhI1uSFfyyiSAcsPWhhrysc9pppqmYrT//CdUu3+bhVEW3jUDBaGUBtGy9wO6LD czAFeX5xPa6j3V6FiLTWyBisadXC9gVdhMy5MCrjRDQ8x95nwRLciJJClM7W/V0dVdCe C4luXRE4vrlSBIDb4o2RVaf0MtNDh1DDUwiZOhnZ/HgBawENy/M09JxoVPlpPJ7ZAH15 IR+w== 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=I6N6bv0h1HrvQoG0yNZnRE9a99bMMNihpEquu9JqhQ0=; b=bS/Y4Fu9LM303R3XSIBa+GLJXxmt7huhfDjlJSwNJ2oUPbGOptACO3hAH4DMLVxRU8 5hi2UW3UDL2mfN7PSGimNyv9A5ky9qYYr1AqQsI1s3+YVtyDG0mlQIT8u79KsKpQxZPk rwVkvel8TQEOIpBsU4hNBw44z2cJFhgjwjmvUZYYA4uBQsvPXfjjNNcWnFbVlLAgM8Jo 3WUh/19zvkLJQxuZfILFQQYlIJLadonvnnwGI2H0aM+4iSELWF9lOduFnt9QMVb/QR0M L8z4hBY4At8GlSHtnkOWTWz0SGc9CehcnrfCjD/uIsi8KCWboJY4d5X+y0VFtEpsUgFD nJEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="kXHa+xN/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 h6si961768plr.105.2019.08.28.22.30.54; Wed, 28 Aug 2019 22:30:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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="kXHa+xN/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727411AbfH2Faw (ORCPT + 28 others); Thu, 29 Aug 2019 01:30:52 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:44684 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726009AbfH2Fav (ORCPT ); Thu, 29 Aug 2019 01:30:51 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190829053050euoutp02b97ba0cba7130364d741dcf9bda6f965~-TbiFdTim3222532225euoutp02G for ; Thu, 29 Aug 2019 05:30:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190829053050euoutp02b97ba0cba7130364d741dcf9bda6f965~-TbiFdTim3222532225euoutp02G 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+3G85UJHRo1dtjccoHNNVrAhtLqBOwuFqG83Ee0NI5sK0RU6Gw8F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VfmHmKU4GBWEuF9pJIa 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) -- 2.17.1 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);