From patchwork Tue Nov 16 20:07:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 12692792 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26105C433F5 for ; Tue, 16 Nov 2021 20:09:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E5EBE619BB for ; Tue, 16 Nov 2021 20:09:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E5EBE619BB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=V83dy0OuI84uimDWUJKQGq9Ut9IU0mgv+JAXOseqAGw=; b=guqhyR+kBpjsaz mqbrv4RHuXwzXri2+qQ1+8ALgJXOFOgxRE5ixHAkJgJNpIyrH+IYU0/b+tfOJ6IbcdDRh3Z76DXiw hUYtSc+tu0lmYW2wQg46D2xmhsx4z08bO7dwtM68nFIzbmkXrKjLDCuUaBOn04iUVxo2ZN/QwcbLy QpIbj4wQUDvHA8oeMi0lxdljtpaRtw8Wl6LmTd1tel/Lth+rZgY6WjnvSO3yFuv5T6Z8CAzvr+Gtp IVQ9TODfUGJBXFD8WhgRnrCWo/KpnYhLSJwn4CwPKfm59BALMfhunJHQs1MU2XUKDCXopVoTaTsFj vVbOFDyELarqC2tSKt9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mn4ki-002gFa-O8; Tue, 16 Nov 2021 20:08:24 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mn4kM-002g93-7v for linux-arm-kernel@lists.infradead.org; Tue, 16 Nov 2021 20:08:03 +0000 Received: by mail-pj1-x1033.google.com with SMTP id gb13-20020a17090b060d00b001a674e2c4a8so400820pjb.4 for ; Tue, 16 Nov 2021 12:08:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=crOTKUCyMhT7agRKo0/8Pkjd+/3KY9pvz/mc1Si+z/Y=; b=nr3nPH6E/UK2DHjnHu0MrbBDICwiEtQpKQypZCoAY9mN3IluH3WzQGBKHY6AyYsTw6 VkxtuRt0/80P08P9upngXKgsA3zXW1ac+ZdTxtaC9TJiCkuMVar5H4/zFU7Gpigf6Bkb Jij00vRZJjmaky8FyR9y73W0VeXO2UbGtTSos= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=crOTKUCyMhT7agRKo0/8Pkjd+/3KY9pvz/mc1Si+z/Y=; b=CaUaXBb3We2F2AqpU0k+jcRgs7SyLrcRiwD6E+DmpM+TIOM2sq4SP+aC9AQKQg2PaT XwjctB3r3gkMZ9u1qLCfGmjHfu2/cRFVTINWDJ/x7MyDpsV6x5ohPa2jPVkp7k+pqq5H VRIjMonw3CNI+SHGVu5Dtva22VrTGdno28ohCeC4H44CzrPoU+J2CY/V3Hpuqrc6a+li 1dtFAorQVTbKi5adP2Z1HFNTnlAIjdrse0V6va8zbSS8rgAb1NbSQhGXtilelo0xwajN G7j9+EUMXoLId0piPFeYvHhK8UD5cGZjQEscjOSYCFFXuc8p8FgfIdRnoS1/AmwSZpYw uq9A== X-Gm-Message-State: AOAM5316WkVfHh7DlpDZaMs1/8sjYTChdT+6EU3J2cJkONhTUnERfVD1 Xw7fS+P5xBuUR1lRswUZ0Ken2w== X-Google-Smtp-Source: ABdhPJyyE/9JCr1MRQS5KZgpYT/vJfotilC7Q6491y/QQJNILtemANaDP/oEBXo2rpgkuS28FKQU1w== X-Received: by 2002:a17:90a:4142:: with SMTP id m2mr2336078pjg.80.1637093281134; Tue, 16 Nov 2021 12:08:01 -0800 (PST) Received: from localhost ([2620:15c:202:201:54aa:73ab:b480:41e2]) by smtp.gmail.com with UTF8SMTPSA id y28sm20052235pfa.208.2021.11.16.12.08.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Nov 2021 12:08:00 -0800 (PST) From: Matthias Kaehlcke To: Greg Kroah-Hartman , Alan Stern , Rob Herring , Frank Rowand , Mathias Nyman , Felipe Balbi Cc: linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Stephen Boyd , Peter Chen , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, Douglas Anderson , Roger Quadros , Michal Simek , Ravi Chandra Sadineni , Bastien Nocera , Matthias Kaehlcke , Andrew Lunn , Aswath Govindraju , Dmitry Osipenko , Gregory Clement , Krzysztof Kozlowski , Lukas Bulwahn , Pawel Laszczak , Sebastian Hesselbarth , Tony Lindgren , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v17 7/7] usb: Specify dependencies on USB_XHCI_PLATFORM with 'depends on' Date: Tue, 16 Nov 2021 12:07:39 -0800 Message-Id: <20211116120642.v17.7.If248f05613bbb06a44eb0b0909be5d97218f417b@changeid> X-Mailer: git-send-email 2.34.0.rc1.387.gb447b232ab-goog In-Reply-To: <20211116200739.924401-1-mka@chromium.org> References: <20211116200739.924401-1-mka@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211116_120802_320134_92EAB020 X-CRM114-Status: GOOD ( 18.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Some USB controller drivers that depend on the xhci-plat driver specify this dependency using 'select' in Kconfig. This is not recommended for symbols that have other dependencies as it may lead to invalid configurations. Use 'depends on' to specify the dependency instead of 'select'. For dwc3 specify the dependency on USB_XHCI_PLATFORM in USB_DWC3_HOST and USB_DWC3_DUAL_ROLE. Also adjust the dependencies of USB_DWC3_CORE to make sure that at least one of USB_DWC3_HOST, USB_DWC3_GADGET or USB_DWC3_DUAL_ROLE can be selected. Signed-off-by: Matthias Kaehlcke Reviewed-by: Roger Quadros Reviewed-by: Douglas Anderson --- Changes in v17: - removed explicit dependency on USB from USB_DWC3 - added 'Reviewed-by' tags from Roger and Doug Changes in v16: - none Changes in v15: - adjusted dependencies of USB_DWC3_CORE to make sure it can only be enabled when at least one of USB_DWC3_HOST, USB_DWC3_GADGET or USB_DWC3_DUAL_ROLE is selectable - updated commit message Changes in v14: - none Changes in v13: - patch added to the series drivers/usb/cdns3/Kconfig | 2 +- drivers/usb/dwc3/Kconfig | 5 +++-- drivers/usb/host/Kconfig | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/usb/cdns3/Kconfig b/drivers/usb/cdns3/Kconfig index b98ca0a1352a..07e12f786d48 100644 --- a/drivers/usb/cdns3/Kconfig +++ b/drivers/usb/cdns3/Kconfig @@ -1,7 +1,7 @@ config USB_CDNS_SUPPORT tristate "Cadence USB Support" depends on USB_SUPPORT && (USB || USB_GADGET) && HAS_DMA - select USB_XHCI_PLATFORM if USB_XHCI_HCD + depends on !USB_XHCI_HCD || USB_XHCI_PLATFORM select USB_ROLE_SWITCH help Say Y here if your system has a Cadence USBSS or USBSSP diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index c483f28b695d..8f08b0724379 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -2,8 +2,7 @@ config USB_DWC3 tristate "DesignWare USB3 DRD Core Support" - depends on (USB || USB_GADGET) && HAS_DMA - select USB_XHCI_PLATFORM if USB_XHCI_HCD + depends on (USB_XHCI_PLATFORM || USB_GADGET) && HAS_DMA select USB_ROLE_SWITCH if USB_DWC3_DUAL_ROLE help Say Y or M here if your system has a Dual Role SuperSpeed @@ -30,6 +29,7 @@ choice config USB_DWC3_HOST bool "Host only mode" depends on USB=y || USB=USB_DWC3 + depends on USB_XHCI_PLATFORM help Select this when you want to use DWC3 in host mode only, thereby the gadget feature will be regressed. @@ -44,6 +44,7 @@ config USB_DWC3_GADGET config USB_DWC3_DUAL_ROLE bool "Dual Role mode" depends on ((USB=y || USB=USB_DWC3) && (USB_GADGET=y || USB_GADGET=USB_DWC3)) + depends on USB_XHCI_PLATFORM depends on (EXTCON=y || EXTCON=USB_DWC3) help This is the default mode of working of DWC3 controller where diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index d1d926f8f9c2..e5e612f143a1 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -80,7 +80,7 @@ config USB_XHCI_MTK config USB_XHCI_MVEBU tristate "xHCI support for Marvell Armada 375/38x/37xx" - select USB_XHCI_PLATFORM + depends on USB_XHCI_PLATFORM depends on HAS_IOMEM depends on ARCH_MVEBU || COMPILE_TEST help @@ -112,9 +112,9 @@ config USB_EHCI_BRCMSTB config USB_BRCMSTB tristate "Broadcom STB USB support" depends on (ARCH_BRCMSTB && PHY_BRCM_USB) || COMPILE_TEST + depends on !USB_XHCI_HCD || USB_XHCI_PLATFORM select USB_OHCI_HCD_PLATFORM if USB_OHCI_HCD select USB_EHCI_BRCMSTB if USB_EHCI_HCD - select USB_XHCI_PLATFORM if USB_XHCI_HCD help Enables support for XHCI, EHCI and OHCI host controllers found in Broadcom STB SoC's.