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=-17.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 F3F65C07E99 for ; Fri, 9 Jul 2021 14:12:28 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 53A68613AF for ; Fri, 9 Jul 2021 14:12:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53A68613AF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 00291832C7; Fri, 9 Jul 2021 16:12:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.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 29B98832AE; Fri, 9 Jul 2021 16:12:08 +0200 (CEST) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4DD45832AE for ; Fri, 9 Jul 2021 16:12:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tom.rini@gmail.com Received: by mail-qt1-f176.google.com with SMTP id v18so1009667qtk.5 for ; Fri, 09 Jul 2021 07:12:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=jguXNzlO7Hupo0mJQ3cm+1F2e/2CK9m6QAae0nePSFM=; b=sreb3ucjG83Tc1lGmkSoI0zRMdjg9+VDeBZfBps2pDTaHcgz0sbqxmI6FEo+YZ39fx +E9mqcfKxp3EyCOkGdeaVX/qeOh6ibBuABi5qyGRh3BrhyY9Vz/ZIo3L215/qvQCwpKK 0qCxuRMs+0mD7AOiXNcnc5nx+rx+pAvS5n/P1WmT83fuy/o2AY0gw2stFBv5UgcT19TI +O7Pz/vdwIHOPwV0FtH76Gxjbjf6WvTP81hWVeBpTXfxns3SkcdKxbxIi95E5NTRKSnd qocf2XgpGN+LBjJ4FJq4wwbrutiYyVD0GQA7z79ifKxGxFmfup5rAZ8uc2GVN6A1O7Zd nPAA== X-Gm-Message-State: AOAM530W6iukPZ1ATqp91yr19rV9Ziy84Wz+UmoTSZB58ec5YHrTxNGO 1Lid3IvHuDm/tVngwE10XV/LKFB/DJSy X-Google-Smtp-Source: ABdhPJyKfodxmx1BC2IVztF7bYGbaz8TJ7lZdDQa9ROmFWbCpeM9KiRkhuK2X4uDyq19b5Y8VcWpbA== X-Received: by 2002:ac8:7f02:: with SMTP id f2mr16106600qtk.213.1625839922750; Fri, 09 Jul 2021 07:12:02 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b01-cbda-1083-622a-b9ec-c6c6.res6.spectrum.com. [2603:6081:7b01:cbda:1083:622a:b9ec:c6c6]) by smtp.gmail.com with ESMTPSA id i2sm2558673qko.43.2021.07.09.07.12.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jul 2021 07:12:02 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCHv2 3/4] treewide: Test on CONFIG_USB_HOST (or CONFIG_CMD_USB) not CONFIG_USB Date: Fri, 9 Jul 2021 10:11:55 -0400 Message-Id: <20210709141156.28268-3-trini@konsulko.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210709141156.28268-1-trini@konsulko.com> References: <20210709141156.28268-1-trini@konsulko.com> 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.103.2 at phobos.denx.de X-Virus-Status: Clean As the logic here is only used when we have a USB host controller, test on CONFIG_USB_HOST rather than CONFIG_USB in general. This lets us move towards using CONFIG_USB only as a menu symbol to say that we have some form of USB, and then USB_HOST or USB_GADGET depending on the role that USB plays within the build. Signed-off-by: Tom Rini --- Changes in v2: - New patch --- board/freescale/lx2160a/lx2160a.c | 2 +- board/freescale/mpc837xerdb/mpc837xerdb.c | 2 +- board/tplink/wdr4300/wdr4300.c | 2 +- cmd/Kconfig | 2 +- include/configs/lx2160a_common.h | 2 +- include/configs/stm32mp1.h | 2 +- include/configs/topic_miami.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c index 47a7024f3313..891bc0051413 100644 --- a/board/freescale/lx2160a/lx2160a.c +++ b/board/freescale/lx2160a/lx2160a.c @@ -781,7 +781,7 @@ int ft_board_setup(void *blob, struct bd_info *bd) fdt_fixup_memory_banks(blob, base, size, total_memory_banks); -#ifdef CONFIG_USB +#ifdef CONFIG_USB_HOST fsl_fdt_fixup_dr_usb(blob, bd); #endif diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c index 66b3d9a4651c..84671f63c60b 100644 --- a/board/freescale/mpc837xerdb/mpc837xerdb.c +++ b/board/freescale/mpc837xerdb/mpc837xerdb.c @@ -220,7 +220,7 @@ int misc_init_r(void) int board_late_init(void) { volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; -#ifdef CONFIG_USB +#ifdef CONFIG_USB_HOST clrsetbits_be32(&immap->sysconf.sicrl, SICRL_USB_A, 0x40000000); #endif return 0; diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c index 9134d6bf6d43..f2b92109b6ac 100644 --- a/board/tplink/wdr4300/wdr4300.c +++ b/board/tplink/wdr4300/wdr4300.c @@ -15,7 +15,7 @@ #include #include -#ifdef CONFIG_USB +#ifdef CONFIG_USB_HOST static void wdr4300_usb_start(void) { void __iomem *gpio_regs = map_physmem(AR71XX_GPIO_BASE, diff --git a/cmd/Kconfig b/cmd/Kconfig index f196e6cdd821..e40d390f8820 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1322,7 +1322,7 @@ config CMD_UNIVERSE config CMD_USB bool "usb" - depends on USB + depends on USB_HOST select HAVE_BLOCK_DEVICE help USB support. diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h index 15ea0e4ce1f7..1338ee3cda3b 100644 --- a/include/configs/lx2160a_common.h +++ b/include/configs/lx2160a_common.h @@ -142,7 +142,7 @@ #endif /* USB */ -#ifdef CONFIG_USB +#ifdef CONFIG_USB_HOST #define CONFIG_HAS_FSL_XHCI_USB #ifndef CONFIG_TARGET_LX2162AQDS #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h index 440efa1a55af..c73a2e7b5683 100644 --- a/include/configs/stm32mp1.h +++ b/include/configs/stm32mp1.h @@ -101,7 +101,7 @@ #define BOOT_TARGET_UBIFS(func) #endif -#ifdef CONFIG_USB +#ifdef CONFIG_CMD_USB #define BOOT_TARGET_USB(func) func(USB, usb, 0) #else #define BOOT_TARGET_USB(func) diff --git a/include/configs/topic_miami.h b/include/configs/topic_miami.h index c12cd7ccad8f..b668817c6c8d 100644 --- a/include/configs/topic_miami.h +++ b/include/configs/topic_miami.h @@ -34,7 +34,7 @@ /* Setup proper boot sequences for Miami boards */ -#if defined(CONFIG_USB) +#if defined(CONFIG_USB_HOST) # define EXTRA_ENV_USB \ "usbreset=i2c dev 1 && i2c mw 41 1 ff && i2c mw 41 3 fe && "\ "i2c mw 41 1 fe && i2c mw 41 1 ff\0" \ -- 2.17.1