From patchwork Tue Jul 27 00:41:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 12401159 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A4C3C432BE for ; Tue, 27 Jul 2021 00:41:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DEFC160E78 for ; Tue, 27 Jul 2021 00:41:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234673AbhG0ABT (ORCPT ); Mon, 26 Jul 2021 20:01:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234628AbhG0ABH (ORCPT ); Mon, 26 Jul 2021 20:01:07 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53F67C06179A for ; Mon, 26 Jul 2021 17:41:32 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id d1so6500017pll.1 for ; Mon, 26 Jul 2021 17:41:32 -0700 (PDT) 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=Bg3T3fp6ClOTSMmD1DDjhfIf3JwA594nQfOaMYR27yE=; b=NczGudCY9nMSUhnMs7zIh82RpkRgKfixp/X4RyFsvp4gBKec78U4LI4IkEFA4UmNM4 dvKBV7jlYRCn9IdF2/F63Ym4VK5j4TgTe91ot2Y+sNfm7fpJOEFMxsJrCZCKeK5atiDu EsDnKU/Raj6yrA+U9PbHpNeHe9kjWt4YgIWtQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Bg3T3fp6ClOTSMmD1DDjhfIf3JwA594nQfOaMYR27yE=; b=cQGN+o3BKa40gt2gGVRAurubI91vspB6acQzheqfrPUqi3fkc9pQanRl8POBzo8MoH t4GaOdRE2hZ95k71hvQHHsvBeVGZr6+DbZG+0M4YDTIktr7Q83zIlY+L18eeWRKhTiSU zoMAZUOnBsZM3gNK1C2XHADIS0lVUGKNUcyqdT9K7+sHRL+sCa4RA4oXInZa6UkgSUAL YGPTCyTdNamamRcO2LoKKv6uJJJZJS/YBgrEo8C3tRQO7a+NZ5IL4kwrraYTvCB9DXyp xptO41/KuhxVbPbSfvLueEraBecYXY8AxqR0Wzuzqo7uN8qvaWJIgJF6vpzO8NeLsZVS OW2w== X-Gm-Message-State: AOAM5326xpCv16lWLKBqPtp9GIq1Ebyyldh0c416zjBMBFD0jlAjz78L LaSJrq0FL6R/BfF6l/HLClWHhg== X-Google-Smtp-Source: ABdhPJxrYiV4vpovVhpRKUT3DhTBE5GbBkusAPwrc6zhQkc6fxI+no5VtFCBHD5sFk3N9BFyo83Jjw== X-Received: by 2002:a63:789:: with SMTP id 131mr20994864pgh.45.1627346491923; Mon, 26 Jul 2021 17:41:31 -0700 (PDT) Received: from localhost ([2620:15c:202:201:9c3d:270c:6be9:9c33]) by smtp.gmail.com with UTF8SMTPSA id n134sm1275801pfd.89.2021.07.26.17.41.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Jul 2021 17:41:31 -0700 (PDT) From: Matthias Kaehlcke To: Greg Kroah-Hartman , Alan Stern , Rob Herring , Frank Rowand , Mathias Nyman , Felipe Balbi Cc: Bastien Nocera , Peter Chen , devicetree@vger.kernel.org, Michal Simek , linux-kernel@vger.kernel.org, Douglas Anderson , Krzysztof Kozlowski , linux-usb@vger.kernel.org, Ravi Chandra Sadineni , Stephen Boyd , Matthias Kaehlcke , Aswath Govindraju , Dmitry Osipenko , Fabio Estevam , Pawel Laszczak , Roger Quadros Subject: [PATCH v15 4/6] usb: Specify dependencies on USB_XHCI_PLATFORM with 'depends on' Date: Mon, 26 Jul 2021 17:41:16 -0700 Message-Id: <20210726174048.v15.4.If248f05613bbb06a44eb0b0909be5d97218f417b@changeid> X-Mailer: git-send-email 2.32.0.432.gabb21c7263-goog In-Reply-To: <20210727004118.2583774-1-mka@chromium.org> References: <20210727004118.2583774-1-mka@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.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 --- 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 66b1454c4db2..870f2251350a 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 && 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 df9428f1dc5e..518c2312ef0c 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.