From patchwork Tue Mar 7 16:30:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13164145 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45BE9C6FD1E for ; Tue, 7 Mar 2023 16:32:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230347AbjCGQcN (ORCPT ); Tue, 7 Mar 2023 11:32:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230210AbjCGQbf (ORCPT ); Tue, 7 Mar 2023 11:31:35 -0500 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A047985B2E for ; Tue, 7 Mar 2023 08:31:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=tgR8Ib7gK0xta9 gDLehMBy5oVmognDSKS3+BEb2nqRg=; b=OtSAgJqkwCb6Mk0PQ1uS5dTxmbrriB z12jHlsAq1QaKoaNz3LyOZvaAsGJNQLOxSB+vDtlbV++blTyISQXyUCNW180CXnG LGv5vGJr+bfv0IklUrgYAUh0R4z/LAkOdX2gqKzJ6GGhMXLYSk86uRJHWUFhPfMh /zVCxFrB7G4aA= Received: (qmail 752141 invoked from network); 7 Mar 2023 17:31:08 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 7 Mar 2023 17:31:08 +0100 X-UD-Smtp-Session: l3s3148p1@VDhQ8FH2hI0gAQnoAFQ+AGEn9EY5VOxJ From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Geert Uytterhoeven , Mathias Nyman , Greg Kroah-Hartman , Yoshihiro Shimoda , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/11] usb: host: xhci-rcar: remove leftover quirk handling Date: Tue, 7 Mar 2023 17:30:37 +0100 Message-Id: <20230307163041.3815-10-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230307163041.3815-1-wsa+renesas@sang-engineering.com> References: <20230307163041.3815-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Loading V3 firmware does not need a quirk anymore, remove the leftover code. Fixes: ed8603e11124 ("usb: host: xhci-rcar: Simplify getting the firmware name for R-Car Gen3") Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang --- Please apply individually per subsystem. This is in preparation for R-Car H3 ES1 removal. There are no dependencies. drivers/usb/host/xhci-rcar.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c index 7f18509a1d39..567b096a24e9 100644 --- a/drivers/usb/host/xhci-rcar.c +++ b/drivers/usb/host/xhci-rcar.c @@ -80,7 +80,6 @@ MODULE_FIRMWARE(XHCI_RCAR_FIRMWARE_NAME_V3); /* For soc_device_attribute */ #define RCAR_XHCI_FIRMWARE_V2 BIT(0) /* FIRMWARE V2 */ -#define RCAR_XHCI_FIRMWARE_V3 BIT(1) /* FIRMWARE V3 */ static const struct soc_device_attribute rcar_quirks_match[] = { { @@ -152,8 +151,6 @@ static int xhci_rcar_download_firmware(struct usb_hcd *hcd) if (quirks & RCAR_XHCI_FIRMWARE_V2) firmware_name = XHCI_RCAR_FIRMWARE_NAME_V2; - else if (quirks & RCAR_XHCI_FIRMWARE_V3) - firmware_name = XHCI_RCAR_FIRMWARE_NAME_V3; else firmware_name = priv->firmware_name; From patchwork Tue Mar 7 16:30:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13164144 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D627BC6FD1F for ; Tue, 7 Mar 2023 16:32:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230211AbjCGQcL (ORCPT ); Tue, 7 Mar 2023 11:32:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229776AbjCGQbf (ORCPT ); Tue, 7 Mar 2023 11:31:35 -0500 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F052185A52 for ; Tue, 7 Mar 2023 08:31:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=juPKvg3mXsPI+d KK+OfMfbvis/2IhqLMDrHF/YQ7PsQ=; b=3lkWw1PH2ESzdu3ChWiC3w9aDSEBH7 pQir+nKMoHWKsaU1AarnaMTWjb3cU52GhXObeKKQevM/KoLNJhAoUdBBieIvEesl 33+0VqNGSJz7gJ+IsWZqbiJs+XsMzHzjhdtUm47IebC9fvhS0cXn+arvU2qdUuie MJJYshY1vj544= Received: (qmail 752176 invoked from network); 7 Mar 2023 17:31:09 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 7 Mar 2023 17:31:09 +0100 X-UD-Smtp-Session: l3s3148p1@QeZb8FH2iI0gAQnoAFQ+AGEn9EY5VOxJ From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Laurent Pinchart , Geert Uytterhoeven , Mathias Nyman , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/11] usb: host: xhci-rcar: remove R-Car H3 ES1.* handling Date: Tue, 7 Mar 2023 17:30:38 +0100 Message-Id: <20230307163041.3815-11-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230307163041.3815-1-wsa+renesas@sang-engineering.com> References: <20230307163041.3815-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang --- Please apply individually per subsystem. There are no dependencies and the SoC doesn't boot anymore since v6.3-rc1. drivers/usb/host/xhci-rcar.c | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c index 567b096a24e9..c4925f8d6b06 100644 --- a/drivers/usb/host/xhci-rcar.c +++ b/drivers/usb/host/xhci-rcar.c @@ -12,26 +12,22 @@ #include #include #include -#include #include "xhci.h" #include "xhci-plat.h" #include "xhci-rzv2m.h" #define XHCI_RCAR_FIRMWARE_NAME_V1 "r8a779x_usb3_v1.dlmem" -#define XHCI_RCAR_FIRMWARE_NAME_V2 "r8a779x_usb3_v2.dlmem" #define XHCI_RCAR_FIRMWARE_NAME_V3 "r8a779x_usb3_v3.dlmem" /* -* - The V3 firmware is for almost all R-Car Gen3 (except r8a7795 ES1.x) -* - The V2 firmware is for r8a7795 ES1.x. +* - The V3 firmware is for all R-Car Gen3 * - The V2 firmware is possible to use on R-Car Gen2. However, the V2 causes * performance degradation. So, this driver continues to use the V1 if R-Car * Gen2. * - The V1 firmware is impossible to use on R-Car Gen3. */ MODULE_FIRMWARE(XHCI_RCAR_FIRMWARE_NAME_V1); -MODULE_FIRMWARE(XHCI_RCAR_FIRMWARE_NAME_V2); MODULE_FIRMWARE(XHCI_RCAR_FIRMWARE_NAME_V3); /*** Register Offset ***/ @@ -78,17 +74,6 @@ MODULE_FIRMWARE(XHCI_RCAR_FIRMWARE_NAME_V3); #define RCAR_USB3_RX_POL_VAL BIT(21) #define RCAR_USB3_TX_POL_VAL BIT(4) -/* For soc_device_attribute */ -#define RCAR_XHCI_FIRMWARE_V2 BIT(0) /* FIRMWARE V2 */ - -static const struct soc_device_attribute rcar_quirks_match[] = { - { - .soc_id = "r8a7795", .revision = "ES1.*", - .data = (void *)RCAR_XHCI_FIRMWARE_V2, - }, - { /* sentinel */ } -}; - static void xhci_rcar_start_gen2(struct usb_hcd *hcd) { /* LCLK Select */ @@ -134,9 +119,6 @@ static int xhci_rcar_download_firmware(struct usb_hcd *hcd) const struct firmware *fw; int retval, index, j; u32 data, val, temp; - u32 quirks = 0; - const struct soc_device_attribute *attr; - const char *firmware_name; /* * According to the datasheet, "Upon the completion of FW Download, @@ -145,17 +127,8 @@ static int xhci_rcar_download_firmware(struct usb_hcd *hcd) if (readl(regs + RCAR_USB3_DL_CTRL) & RCAR_USB3_DL_CTRL_FW_SUCCESS) return 0; - attr = soc_device_match(rcar_quirks_match); - if (attr) - quirks = (uintptr_t)attr->data; - - if (quirks & RCAR_XHCI_FIRMWARE_V2) - firmware_name = XHCI_RCAR_FIRMWARE_NAME_V2; - else - firmware_name = priv->firmware_name; - /* request R-Car USB3.0 firmware */ - retval = request_firmware(&fw, firmware_name, dev); + retval = request_firmware(&fw, priv->firmware_name, dev); if (retval) return retval; From patchwork Tue Mar 7 16:30:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13164146 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B9C3C678D5 for ; Tue, 7 Mar 2023 16:32:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230167AbjCGQcQ (ORCPT ); Tue, 7 Mar 2023 11:32:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230323AbjCGQbh (ORCPT ); Tue, 7 Mar 2023 11:31:37 -0500 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0734898E5 for ; Tue, 7 Mar 2023 08:31:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=FoqjTA8Za4V7Be 7RYCx6I7pfuapKZ/gfbeqrJ+oZq7U=; b=lVTYO2h09AuGHmx0lS5IH2B2gRy/0H EZD0zooyaK8UpeBrlro8t4Tzzbzcz4t9pOD+XRaWvoigrKiZgaGBHxlTPDr7IlC8 VzNsnewjdkjffMs9YN5AVi8287uiSh8D+GZn/VX/mx8ejokS/1pNbbDjHEUBQLKl jwU1HcVVWmawE= Received: (qmail 752222 invoked from network); 7 Mar 2023 17:31:09 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 7 Mar 2023 17:31:09 +0100 X-UD-Smtp-Session: l3s3148p1@ggVo8FH2io0gAQnoAFQ+AGEn9EY5VOxJ From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Laurent Pinchart , Geert Uytterhoeven , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/11] usb: gadget: udc: renesas_usb3: remove R-Car H3 ES1.* handling Date: Tue, 7 Mar 2023 17:30:39 +0100 Message-Id: <20230307163041.3815-12-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230307163041.3815-1-wsa+renesas@sang-engineering.com> References: <20230307163041.3815-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org R-Car H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. These become a maintenance burden now, so our development group decided to remove upstream support and disable booting for this SoC. Public users only have ES2 onwards. Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang --- Please apply individually per subsystem. There are no dependencies and the SoC doesn't boot anymore since v6.3-rc1. drivers/usb/gadget/udc/renesas_usb3.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c index bee6bceafc4f..f2ac6447b748 100644 --- a/drivers/usb/gadget/udc/renesas_usb3.c +++ b/drivers/usb/gadget/udc/renesas_usb3.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -2781,13 +2780,6 @@ static void renesas_usb3_init_ram(struct renesas_usb3 *usb3, struct device *dev, } } -static const struct renesas_usb3_priv renesas_usb3_priv_r8a7795_es1 = { - .ramsize_per_ramif = SZ_16K, - .num_ramif = 2, - .ramsize_per_pipe = SZ_4K, - .workaround_for_vbus = true, -}; - static const struct renesas_usb3_priv renesas_usb3_priv_gen3 = { .ramsize_per_ramif = SZ_16K, .num_ramif = 4, @@ -2829,14 +2821,6 @@ static const struct of_device_id usb3_of_match[] = { }; MODULE_DEVICE_TABLE(of, usb3_of_match); -static const struct soc_device_attribute renesas_usb3_quirks_match[] = { - { - .soc_id = "r8a7795", .revision = "ES1.*", - .data = &renesas_usb3_priv_r8a7795_es1, - }, - { /* sentinel */ } -}; - static const unsigned int renesas_usb3_cable[] = { EXTCON_USB, EXTCON_USB_HOST, @@ -2854,13 +2838,8 @@ static int renesas_usb3_probe(struct platform_device *pdev) struct renesas_usb3 *usb3; int irq, ret; const struct renesas_usb3_priv *priv; - const struct soc_device_attribute *attr; - attr = soc_device_match(renesas_usb3_quirks_match); - if (attr) - priv = attr->data; - else - priv = of_device_get_match_data(&pdev->dev); + priv = of_device_get_match_data(&pdev->dev); irq = platform_get_irq(pdev, 0); if (irq < 0)