From patchwork Fri Aug 25 10:42:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Suvorov X-Patchwork-Id: 1825919 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.a=rsa-sha256 header.s=google header.b=LsYLmHVZ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RXGkm1BgJz1yfF for ; Fri, 25 Aug 2023 20:43:12 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1A5C4866BB; Fri, 25 Aug 2023 12:43:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.b="LsYLmHVZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 232AA865D1; Fri, 25 Aug 2023 12:43:08 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) (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 8BD91867CA for ; Fri, 25 Aug 2023 12:43:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=oleksandr.suvorov@foundries.io Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-4ff09632194so1148323e87.2 for ; Fri, 25 Aug 2023 03:43:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; t=1692960184; x=1693564984; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=38HyQipAt8GcNLZqXLpLjUxXkp99nVosgY1kfpTiY7E=; b=LsYLmHVZ0LA2hxqPRjBcngr/uzlfTCx9CA/Gs0P+6g9ttVcrrqqnjbyHj7MsS2RwpY VhAJMbZU90gbSymGsINEJtD3wq2vQ+qmhMxs9jN6AG+4FLfQLITnHRNyvE43E7qdsD7g trxj1kreKWlZnNluDHPS8BqsttZBBVMUh63NNIPr6QToiZxe93WQ1m3Ka9IVE42RPqua xZ9tUhkFiOWY2/BiRfLD/ktgJEvvAIXoebWuqC7wOvdE9V7I2hN5Nn44eKRz5cWkQzUI FmT43XPFUrE/h8l32SQHyTrNJ7OTt70pLIPWvVt0Usu9N+50Upba+qOC1iJp+w4qIWcQ BHew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692960184; x=1693564984; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=38HyQipAt8GcNLZqXLpLjUxXkp99nVosgY1kfpTiY7E=; b=BNl4pzbAfb0CWCYFA19nbqtIQfxHLHmXvqndn3XgHVXxywaPdyGPgEc7sCDwdEA2V6 rmBwLh6d44rIu2m0+Io985cEoAiXcLsXnDDnWrsddwsusUJFRKe7UNWbD4HxmjMti9f7 OOA3ePLULghCuFls3w3qjxCSCjcAF48lCeUlqydIb32feNUEsKS5ZwYgX44dhpLJNVAS 6EAs57CPFNm8r0mq/eqEnmHe1e4KhX8LAHyRkEOL+XJPUANgxs3wvP7iMQ8dw6Dom+Co llxtGXCUufqZQKDuWKWG3nlO1vReeDYj0mrbS2GCjZFuplfn4NtvF8bF8wplmdcfRPpO 9CMg== X-Gm-Message-State: AOJu0YwL7+kExWzp0wfGCVtdN1EpYiT7GSyCogQzvl1Hzh9Ydc66RwHX FX1TTXA7uiTpXqYvEbTTDwWyOG4za3krPajKhR0= X-Google-Smtp-Source: AGHT+IFhcK1lCOLXlfjGHbi6b2LDXdaMo6WiijYH8/S+ZrL7MxigDCYZNz/yjFe5ACMznHSdRa/gpw== X-Received: by 2002:a05:6512:b20:b0:4fe:1681:9377 with SMTP id w32-20020a0565120b2000b004fe16819377mr12355595lfu.44.1692960184432; Fri, 25 Aug 2023 03:43:04 -0700 (PDT) Received: from cryobook.. ([93.188.34.55]) by smtp.gmail.com with ESMTPSA id e17-20020ac25471000000b004ff71ecaebcsm238359lfn.268.2023.08.25.03.43.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 03:43:03 -0700 (PDT) From: Oleksandr Suvorov To: u-boot@lists.denx.de Cc: Oleksandr Suvorov , Marek Vasut , Simon Glass Subject: [PATCH v3 1/2] usb: dwc3: Fix renaming SPL_USB_HOST_SUPPORT to SPL_USB_HOST Date: Fri, 25 Aug 2023 13:42:39 +0300 Message-ID: <20230825104251.28311-1-oleksandr.suvorov@foundries.io> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean In the usb/dwc3-layerscape driver the first option should be renamed to the latter as well. Do it. Fix original logic in dwc3_layerscape_bind() - do not enable Fixes: 333e4a621df ("Rename SPL_USB_HOST_SUPPORT to SPL_USB_HOST") Signed-off-by: Oleksandr Suvorov --- (no changes since v1) drivers/usb/dwc3/dwc3-layerscape.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-layerscape.c b/drivers/usb/dwc3/dwc3-layerscape.c index 79cf71f7a85..58baa017ad1 100644 --- a/drivers/usb/dwc3/dwc3-layerscape.c +++ b/drivers/usb/dwc3/dwc3-layerscape.c @@ -134,8 +134,7 @@ U_BOOT_DRIVER(dwc3_layerscape_peripheral) = { }; #endif -#if defined(CONFIG_SPL_USB_HOST_SUPPORT) || \ - !defined(CONFIG_SPL_BUILD) && defined(CONFIG_USB_HOST) +#if CONFIG_IS_ENABLED(USB_HOST) static int dwc3_layerscape_host_probe(struct udevice *dev) { struct xhci_hcor *hcor; @@ -194,7 +193,7 @@ static int dwc3_layerscape_bind(struct udevice *dev) driver = "dwc3-layerscape-peripheral"; break; #endif -#if defined(CONFIG_SPL_USB_HOST_SUPPORT) || !defined(CONFIG_SPL_BUILD) +#if defined(CONFIG_SPL_USB_HOST) || !defined(CONFIG_SPL_BUILD) case USB_DR_MODE_HOST: dev_dbg(dev, "Using host mode\n"); driver = "dwc3-layerscape-host"; From patchwork Fri Aug 25 10:42:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Suvorov X-Patchwork-Id: 1825920 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.a=rsa-sha256 header.s=google header.b=KcVzZ+z8; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RXGkx70glz1yfF for ; Fri, 25 Aug 2023 20:43:21 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5E9E3867F7; Fri, 25 Aug 2023 12:43:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.b="KcVzZ+z8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7322F867F7; Fri, 25 Aug 2023 12:43:10 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) (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 BBC718681D for ; Fri, 25 Aug 2023 12:43:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=oleksandr.suvorov@foundries.io Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-50078e52537so1135042e87.1 for ; Fri, 25 Aug 2023 03:43:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; t=1692960186; x=1693564986; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Nx3Ir95vsspcS93KA6dd59EJxbUpConhD04moMvlaDM=; b=KcVzZ+z8lRKwp7FX7ZJ2W4e0M4792WOlJeM+op5g1M0GBZ0t6xWf69iVBIPXEBB6Nm Q3qdiofu3FwZeyDXFf8X1Y83Kn9HZVe39kABnmZfX255ec0AYuzo5bBCTxhzqzPD9f+p 1GJOckuqPETjaHV4xPBZtTBtzfhOor7WWwvhr8fFbS7TmKJFjTnvI+2kFUg5f08pUB6Q JJOwJ43DO7W/yNREr0r4AG9c2WMG8Xet/Z0ooj3YBnj7p1o5YKWCYe72lbhtl2NDhM0H QLMeC+bY7ALNnyMfIiHaPupHsO3xPmY8YwQMbqN+bkg+WZyuQxVQ+ypH8gg+oguXhlv9 AVcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692960186; x=1693564986; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Nx3Ir95vsspcS93KA6dd59EJxbUpConhD04moMvlaDM=; b=GsyC31jZTLm2hgr5wpbfRZNsGfIsdzPSTjlvbjpw1hiPyNERq7gaTf/WIBfYgOfVtr LVzJ3Lj6Czg9PC8mHUqubwO5BGLIRmeBMVVq/xJOIOsD/PaKHQL/V1AafSFSEdy2FkJI FSKY1+EtBwEgK18UEZv0RHbjm0uJ30m7Ts01z2MXl1fKyAgwb+AJ/VQsfwtHd4R7nGM8 LfGdGB5udZZznaB1HxoNwn2uU73wSjuJoFf7EbgHpoowgXZjYxtND9+VUdHgudCJFceZ R+nnlJparHhEJE7hbu5/EdBxaXRmUnQGveDyG2XyoRqScSb6J2OHDaRMKpngMSxpOZoe F12Q== X-Gm-Message-State: AOJu0YyX/UJ/JvaSAlJAoUC5RKWixSENJDlr9P2K/u0prQTZJz7opQdY 2fyh6ovvesq9XpuXoEP8MKTfcSEjtqZAtzsbqA4= X-Google-Smtp-Source: AGHT+IHGHyArTcSpIMe5qlrSUkoDPBcg8NiLRmPhdeSTm6ZmXutGZ1MUBWkFqxDvIrzClPem/HvzVA== X-Received: by 2002:a05:6512:ea4:b0:4fb:8c52:611 with SMTP id bi36-20020a0565120ea400b004fb8c520611mr17356267lfb.38.1692960185722; Fri, 25 Aug 2023 03:43:05 -0700 (PDT) Received: from cryobook.. ([93.188.34.55]) by smtp.gmail.com with ESMTPSA id e17-20020ac25471000000b004ff71ecaebcsm238359lfn.268.2023.08.25.03.43.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 03:43:05 -0700 (PDT) From: Oleksandr Suvorov To: u-boot@lists.denx.de Cc: Oleksandr Suvorov , Marek Vasut , Michael Walle , Priyanka Jain Subject: [PATCH v3 2/2] usb: dwc3: Fix enabling USB_DR_MODE_HOST Date: Fri, 25 Aug 2023 13:42:40 +0300 Message-ID: <20230825104251.28311-2-oleksandr.suvorov@foundries.io> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230825104251.28311-1-oleksandr.suvorov@foundries.io> References: <20230825104251.28311-1-oleksandr.suvorov@foundries.io> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean The original logic always enables USB_DR_MODE_HOST operation mode in dwc3_layerscape_bind() in u-boot. Prevent choosing USB_DR_MODE_HOST operation mode if USB_HOST is not enabled. Fixes: 2b0b51d0bed ("usb: dwc3: add layerscape support") Signed-off-by: Oleksandr Suvorov --- Changes in v3: - fix original logic of choosing a host operation mode Changes in v2: - shrink the code using CONFIG_IS_ENABLED() drivers/usb/dwc3/dwc3-layerscape.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-layerscape.c b/drivers/usb/dwc3/dwc3-layerscape.c index 58baa017ad1..c32df2396d7 100644 --- a/drivers/usb/dwc3/dwc3-layerscape.c +++ b/drivers/usb/dwc3/dwc3-layerscape.c @@ -193,7 +193,7 @@ static int dwc3_layerscape_bind(struct udevice *dev) driver = "dwc3-layerscape-peripheral"; break; #endif -#if defined(CONFIG_SPL_USB_HOST) || !defined(CONFIG_SPL_BUILD) +#if CONFIG_IS_ENABLED(USB_HOST) case USB_DR_MODE_HOST: dev_dbg(dev, "Using host mode\n"); driver = "dwc3-layerscape-host";