From patchwork Fri Jul 19 09:30:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 169236 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp3602807ilk; Fri, 19 Jul 2019 02:30:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcssZfB2aqc5AXFPOKhl+SkKZ7tM/1tK2E9GD/aIbtElMFrR5LKZOdOxUJJA+ox3FmwN1f X-Received: by 2002:a63:3203:: with SMTP id y3mr53630888pgy.191.1563528650573; Fri, 19 Jul 2019 02:30:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563528650; cv=none; d=google.com; s=arc-20160816; b=MTOTnRYps+OZ9qH6/VFZZnOlcRPLsj/+PX53Znp68ypuZ1JR5WgdzjwiA6DS250B3u ADKMg21tPBNgq8W8VMpuBl035FS30I3ppuDVUcBocbyc+AgDS7QvlHQtzx2POkGzcqEx ukeiWwndd4N/5JGoigO+RkVx2+zAqfLzCu3VRbAy+iTlBq3li0928XP5LWK4uQ2Hk/ya fYhUildsX4RVQlFMce6lgLWdYIUr2oA103F/Aq/k84aGkl8gCbjfpjL00YQ0rlicuhlf h6s/Htn7eS3tIH/gnMmFC3MY/g3ynOlOytn8u+DkdmEYrZNr9J2QJ+iNCSUpyE62pI+x v3sA== 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:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=4WJcerrgtqpZTnMzI8e8akF7VisSMSEGx9wGghtcB1M=; b=INhOQvBGh5zl32qAqoqeBrvBdb3ablKzyE0G0EH4p/qm3i90YRTJiWJCFNPAIf1CwU hFUtawaQ0GTfUrha/pqPekQM+blkVXF5cWXoKvnGDk3frF0Sg8BOKW5f2y3mQ0C7n24+ r67E6+6rDH47HNX+Nu4EiY0J95l/OGhNn3co1tm36CwU6jkXDIYKWE51ciDnuoCsxG5A UAJ7FUbe1wP5NhFEyS8VgcxP4XGyL0Xhb3ukDkQuJhaEcy+YlDkxPwRQ5beyPZLH+MjR xPCWCyuTeCp41SKSVZFivgSxOVcQsj5eUH8nL4BC0pMzi2B4bkPOC4U7qGkCIk/7bjvC bmlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=hvN+B6NM; 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 b12si51277pgm.368.2019.07.19.02.30.49; Fri, 19 Jul 2019 02:30:50 -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=hvN+B6NM; 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 S1726837AbfGSJas (ORCPT + 29 others); Fri, 19 Jul 2019 05:30:48 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:50321 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725794AbfGSJar (ORCPT ); Fri, 19 Jul 2019 05:30:47 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190719093046euoutp02e676421cf21a792fa21517d04e2f4166~yxQU33SKw2889628896euoutp02V for ; Fri, 19 Jul 2019 09:30:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190719093046euoutp02e676421cf21a792fa21517d04e2f4166~yxQU33SKw2889628896euoutp02V DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1563528646; bh=4WJcerrgtqpZTnMzI8e8akF7VisSMSEGx9wGghtcB1M=; h=From:To:Cc:Subject:Date:References:From; b=hvN+B6NMN9agXkG4cyi9Drh+0zVNlzuVVPOrhFRifFTCS8wuYk7XGZi5SWdXqjmwc rSNcrgVZbyUiA69jXMsEObLsUM/E0DiDheIqNmW5dJ7veIsjG4H4FcXeDMc7Cxp2pk iJ8oh8sty5JfoZaDfOT3/QeWUZ8bRdInntJdQcso= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190719093046eucas1p2bb8352bf1b3c2e8dac7829539acd8c0e~yxQUYzFPB2488424884eucas1p2S; Fri, 19 Jul 2019 09:30:46 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 62.D2.04377.5CD813D5; Fri, 19 Jul 2019 10:30:46 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190719093045eucas1p1a1c6f26ae4103e9ed283fff2396beaef~yxQTmz3S31684216842eucas1p1x; Fri, 19 Jul 2019 09:30:45 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190719093045eusmtrp2432848cc26ad2cd414490ba5972aab52~yxQTaq_lj1662516625eusmtrp23; Fri, 19 Jul 2019 09:30:45 +0000 (GMT) X-AuditID: cbfec7f4-113ff70000001119-4e-5d318dc598c2 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 67.79.04146.5CD813D5; Fri, 19 Jul 2019 10:30:45 +0100 (BST) Received: from AMDC2765.DIGITAL.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190719093044eusmtip179cb8ff21b96772ee15df951a7268fbf~yxQTAQUsN1578415784eusmtip1d; Fri, 19 Jul 2019 09:30:44 +0000 (GMT) From: Marek Szyprowski To: linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Marek Szyprowski , Mathias Nyman , Felipe Balbi , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski Subject: [PATCH] usb: dwc3: remove generic PHYs forwarding for XHCI device Date: Fri, 19 Jul 2019 11:30:37 +0200 Message-Id: <20190719093037.16181-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHIsWRmVeSWpSXmKPExsWy7djPc7rHeg1jDY4dZ7LYOGM9q8Wxtifs FufPb2C3uLxrDpvFjPP7mCwWLWtltlh75C67RfOmKawOHB6L97xk8ti0qpPNo2/LKkaPz5vk AliiuGxSUnMyy1KL9O0SuDJaVrxnLHgqXPF77grGBsaZAl2MnBwSAiYSvfP3M4HYQgIrGCVO L1LuYuQCsr8wSnyYtpYRwvnMKPHkfhdQFQdYx759hRDx5YwS777/ZYfr2PX7HQvIKDYBQ4mu t11sILaIgIPEkqV3wGxmgV+MEk2zNEFsYQEviYML57KD2CwCqhI9V6eC1fAK2Ep86njCCnGe vMTqDQeYQRZICFxnk5h48w4jRMJF4taDQ0wQtrDEq+Nb2CFsGYn/O+czQTQ0M0o8PLeWHcLp YZS43DQDqtta4vDxi6wg/zALaEqs36UPEXaUuDVrKgvEm3wSN94KQhzNJzFp23RmiDCvREeb EES1msSs4+vg1h68cIkZwvaQ2Nm5mg0SpLESXxonM09glJuFsGsBI+MqRvHU0uLc9NRio7zU cr3ixNzi0rx0veT83E2MwFRw+t/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XhAz4fQi5E+PU/9b5nVO8hkims8cq7vXJaxuCVAiaU4I9FQi7moOBEAkFq8 z1gCAAA= X-CMS-MailID: 20190719093045eucas1p1a1c6f26ae4103e9ed283fff2396beaef X-Msg-Generator: CA X-RootMTR: 20190719093045eucas1p1a1c6f26ae4103e9ed283fff2396beaef X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190719093045eucas1p1a1c6f26ae4103e9ed283fff2396beaef References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 08f871a3aca2 ("usb: dwc3: host: convey the PHYs to xhci") added forwarding of the generic PHYs from DWC3 core to the instantiated XHCI-plat device. However XHCI(-plat) driver never gained support for generic PHYs, thus the lookup added by that commit is never used. In meantime the commit d64ff406e51e ("usb: dwc3: use bus->sysdev for DMA configuration") incorrectly changed the device used for creating lookup, making the lookup useless and generic PHYs inaccessible from XHCI device. However since commit 178a0bce05cb ("usb: core: hcd: integrate the PHY wrapper into the HCD core") USB HCD already handles generic PHYs acquired from the HCD's 'sysdev', which in this case is DWC3 core device. This means that creating any custom lookup entries for XHCI driver is no longer needed and can be simply removed. Signed-off-by: Marek Szyprowski --- drivers/usb/dwc3/host.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) -- 2.17.1 diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index f55947294f7c..8deea8c91e03 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -85,7 +85,7 @@ int dwc3_host_init(struct dwc3 *dwc) DWC3_XHCI_RESOURCES_NUM); if (ret) { dev_err(dwc->dev, "couldn't add resources to xHCI device\n"); - goto err1; + goto err; } memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props)); @@ -112,37 +112,23 @@ int dwc3_host_init(struct dwc3 *dwc) ret = platform_device_add_properties(xhci, props); if (ret) { dev_err(dwc->dev, "failed to add properties to xHCI\n"); - goto err1; + goto err; } } - phy_create_lookup(dwc->usb2_generic_phy, "usb2-phy", - dev_name(dwc->dev)); - phy_create_lookup(dwc->usb3_generic_phy, "usb3-phy", - dev_name(dwc->dev)); - ret = platform_device_add(xhci); if (ret) { dev_err(dwc->dev, "failed to register xHCI device\n"); - goto err2; + goto err; } return 0; -err2: - phy_remove_lookup(dwc->usb2_generic_phy, "usb2-phy", - dev_name(dwc->dev)); - phy_remove_lookup(dwc->usb3_generic_phy, "usb3-phy", - dev_name(dwc->dev)); -err1: +err: platform_device_put(xhci); return ret; } void dwc3_host_exit(struct dwc3 *dwc) { - phy_remove_lookup(dwc->usb2_generic_phy, "usb2-phy", - dev_name(dwc->dev)); - phy_remove_lookup(dwc->usb3_generic_phy, "usb3-phy", - dev_name(dwc->dev)); platform_device_unregister(dwc->xhci); }