From patchwork Wed May 12 14:11:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 435536 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp4864685jao; Wed, 12 May 2021 07:11:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ/9mBUDsepP0FQkujZDvzaKEOWHIfAKp5aZ+Ei800Uzn7z9+u72NkBkx1yeon3G5zmvrO X-Received: by 2002:a05:6402:5106:: with SMTP id m6mr43969859edd.212.1620828701696; Wed, 12 May 2021 07:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620828701; cv=none; d=google.com; s=arc-20160816; b=XwXOK3qVMjC1jovv9uYZEQiSLk+gvjYi8yT6W5OxHTlPBxepDPlng9G7ElyVLvfx3q +4GsNzi4GAZnlQSjIHWdrVV9nf8iRr1pN5E1CBFbb2J3j/aNh8YZR6w8YcpsVkZ0BsEU nfq4sxGQYS0LEFGBHUxzTu9m/yR8xbGKN1LwINfoe6PgDGdQFqWZm2Lt4lRhbMVsp405 BCBe1pG1nFELJAwkQBP19T3hzN1AT0taakNRKX2P7LilQ7xOdNdDIo3vxSW6RsQSeDSl YuUeulpA+QKcRPKjJTQco3VmuKgtsYysYPnWdjVzbEfKceFYaLI3RQaAPT6eEbo/jfpc /HRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=OEF8XYuNDUNPm8MuwE9MrGnCQDyKUkidgcrnJfkddcw=; b=aXcrFwMIPTUvqUciSAY1yo8ATOySbTZKwAqjzBvVuayFKyP/Gz5Z4j6vWyT/SMxPQ3 NqLlJ7HGvnlFAFkpXQT/jE26f0dJWqTKnnRa8q99szYvp1jwzdmQ17JcQWh7XqKLI4w1 pt0knE+lTFdl2Lo/3nbuiq/Mucf3YwyH49J+Bpu0mN88TaIY12RmVFXI9bu/kywLXJYE 6uVKOT3RUmG6Y+bl+4U0j72tM2ogIscA+RzOO8q/53qXeTRYYcTux+yICja36xwFAg5m dtp27HtbnXSeRrlRDc54P0XxjLWqnFiq7XUIBpwUKolBorkDNkICwqi9wcPKCyFrZhB+ 8ccA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id b2si21274047edy.80.2021.05.12.07.11.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 07:11:41 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6C54482D50; Wed, 12 May 2021 16:11:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 1B40382D62; Wed, 12 May 2021 16:11:36 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by phobos.denx.de (Postfix) with ESMTP id D0CD282CF6 for ; Wed, 12 May 2021 16:11:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=hayashi.kunihiko@socionext.com Received: from unknown (HELO kinkan2-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 12 May 2021 23:11:31 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by kinkan2-ex.css.socionext.com (Postfix) with ESMTP id AE98F205902A; Wed, 12 May 2021 23:11:31 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Wed, 12 May 2021 23:11:31 +0900 Received: from plum.e01.socionext.com (unknown [10.212.243.119]) by kinkan2.css.socionext.com (Postfix) with ESMTP id 1AE3AB1D40; Wed, 12 May 2021 23:11:31 +0900 (JST) From: Kunihiko Hayashi To: Marek Vasut Cc: u-boot@lists.denx.de, Kunihiko Hayashi Subject: [PATCH] usb: dwc3-generic: Disable host driver definition if gadget only Date: Wed, 12 May 2021 23:11:14 +0900 Message-Id: <1620828674-24145-1-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean Even if only USB gadget is defined, dwc3 generic driver enables a definition and probe/remove functions for host driver. This enables the definition if USB_HOST is enabled only. Signed-off-by: Kunihiko Hayashi --- drivers/usb/dwc3/dwc3-generic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c index 30f835e..c8bf4ae 100644 --- a/drivers/usb/dwc3/dwc3-generic.c +++ b/drivers/usb/dwc3/dwc3-generic.c @@ -163,7 +163,8 @@ U_BOOT_DRIVER(dwc3_generic_peripheral) = { }; #endif -#if defined(CONFIG_SPL_USB_HOST_SUPPORT) || !defined(CONFIG_SPL_BUILD) +#if defined(CONFIG_SPL_USB_HOST_SUPPORT) || \ + !defined(CONFIG_SPL_BUILD) && defined(CONFIG_USB_HOST) static int dwc3_generic_host_probe(struct udevice *dev) { struct xhci_hcor *hcor;