From patchwork Thu Aug 25 13:18:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 600207 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEE12C64990 for ; Thu, 25 Aug 2022 13:19:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242433AbiHYNTl (ORCPT ); Thu, 25 Aug 2022 09:19:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241948AbiHYNTj (ORCPT ); Thu, 25 Aug 2022 09:19:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E72EEAA37A; Thu, 25 Aug 2022 06:19:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 829BC61CD3; Thu, 25 Aug 2022 13:19:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E229AC433D6; Thu, 25 Aug 2022 13:19:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661433572; bh=FO3o/vDoP9XtmRQXXKxIgPtLa05j7400CrUZvjFU5GM=; h=From:To:Cc:Subject:Date:From; b=X2hz5ehw79Z6abk+ajVRkSathM2xiXRPLCyieuOcBe/Ol7VgZgQrb70178DjIB8uU 9fx8WJMOmkx7tD6y+KMinJBCSz3U3v/a1t4elWmQ6eKJeu9w+VyHEYGqNcani7rMZ7 OmnXKZK1w6dscdqeUZytFOx2k/EeQiJIhjhMXp8Wl+dJL9hQI5TnEwIEc/kfuZch1O 0h+BqH49dhkXmb9WszaFxcd1E0E+UY8wGOiOBJLYMbjBmSMbkYydteViboo5+oy6FY jE+/5o+d7Wa9JKG5UHRVkn71wkm02xVD0q7ItjhGzA4kLIS4bBdLLz5q+a0/TJbkTK dhH7CviSbkYBA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oRClm-00059W-DK; Thu, 25 Aug 2022 15:19:39 +0200 From: Johan Hovold To: Greg Kroah-Hartman , Felipe Balbi Cc: Matthias Kaehlcke , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH] usb: dwc3: disable USB core PHY management Date: Thu, 25 Aug 2022 15:18:36 +0200 Message-Id: <20220825131836.19769-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The dwc3 driver manages its PHYs itself so the USB core PHY management needs to be disabled. Use the struct xhci_plat_priv hack added by commits 46034a999c07 ("usb: host: xhci-plat: add platform data support") and f768e718911e ("usb: host: xhci-plat: add priv quirk for skip PHY initialization") to propagate the setting for now. Fixes: 4e88d4c08301 ("usb: add a flag to skip PHY initialization to struct usb_hcd") Fixes: 178a0bce05cb ("usb: core: hcd: integrate the PHY wrapper into the HCD core") Signed-off-by: Johan Hovold --- drivers/usb/dwc3/host.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index f6f13e7f1ba1..a7154fe8206d 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -11,8 +11,13 @@ #include #include +#include "../host/xhci-plat.h" #include "core.h" +static const struct xhci_plat_priv dwc3_xhci_plat_priv = { + .quirks = XHCI_SKIP_PHY_INIT, +}; + static void dwc3_host_fill_xhci_irq_res(struct dwc3 *dwc, int irq, char *name) { @@ -92,6 +97,11 @@ int dwc3_host_init(struct dwc3 *dwc) goto err; } + ret = platform_device_add_data(xhci, &dwc3_xhci_plat_priv, + sizeof(dwc3_xhci_plat_priv)); + if (ret) + goto err; + memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props)); if (dwc->usb3_lpm_capable)