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: 11049925 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AC55013B1 for ; Fri, 19 Jul 2019 09:30:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CBC0285D6 for ; Fri, 19 Jul 2019 09:30:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90E35287FE; Fri, 19 Jul 2019 09:30:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B4E6287E6 for ; Fri, 19 Jul 2019 09:30:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726858AbfGSJat (ORCPT ); Fri, 19 Jul 2019 05:30:49 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:50325 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726029AbfGSJas (ORCPT ); Fri, 19 Jul 2019 05:30:48 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190719093047euoutp02cc5f3d3f59e9244af9630c4134f46a58~yxQVK3iWs2887528875euoutp02Y for ; Fri, 19 Jul 2019 09:30:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190719093047euoutp02cc5f3d3f59e9244af9630c4134f46a58~yxQVK3iWs2887528875euoutp02Y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1563528647; bh=4WJcerrgtqpZTnMzI8e8akF7VisSMSEGx9wGghtcB1M=; h=From:To:Cc:Subject:Date:References:From; b=dqAvGEd5xl10PjmvaVjQYm/TMtBAi0wo53BIP7/mWXlWM9qeImA1F66OfD6ljfsVJ st4fU23yIvsWgqrwVbSz/UPNKkk3lH5+65DTnyCy6VcY4cdkfxYc9KAUtUo/4TAaEc GuPeZgi8Qt1/FReRR85kEmhTHRz1jrOpwBp01wyU= 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/xLzsYd/1JOsQowM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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-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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); }