linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] tree-wide: remove support for Renesas R-Car H3 ES1
@ 2023-03-07 16:30 Wolfram Sang
  2023-03-07 16:30 ` [PATCH 09/11] usb: host: xhci-rcar: remove leftover quirk handling Wolfram Sang
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Wolfram Sang @ 2023-03-07 16:30 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, dri-devel, iommu, linux-kernel, linux-media,
	linux-mmc, linux-pm, linux-usb, netdev

Because H3 ES1 becomes an increasing maintenance burden and was only available
to a development group, we decided to remove upstream support for it. Here are
the patches to remove driver changes. Review tags have been gathered before
during an internal discussion. Only change since the internal version is a
plain rebase to v6.3-rc1. A branch with all removals is here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/h3es1-removal

Please apply individually per subsystem. There are no dependencies and the SoC
doesn't boot anymore since v6.3-rc1.

Thanks and happy hacking!


Wolfram Sang (11):
  iommu/ipmmu-vmsa: remove R-Car H3 ES1.* handling
  drm: rcar-du: remove R-Car H3 ES1.* workarounds
  media: rcar-vin: remove R-Car H3 ES1.* handling
  media: rcar-vin: csi2: remove R-Car H3 ES1.* handling
  media: renesas: fdp1: remove R-Car H3 ES1.* handling
  thermal/drivers/rcar_gen3_thermal: remove R-Car H3 ES1.* handling
  ravb: remove R-Car H3 ES1.* handling
  mmc: renesas_sdhi: remove R-Car H3 ES1.* handling
  usb: host: xhci-rcar: remove leftover quirk handling
  usb: host: xhci-rcar: remove R-Car H3 ES1.* handling
  usb: gadget: udc: renesas_usb3: remove R-Car H3 ES1.* handling

 drivers/gpu/drm/rcar-du/rcar_du_crtc.c        | 37 ++-----------
 drivers/gpu/drm/rcar-du/rcar_du_drv.c         | 48 -----------------
 drivers/gpu/drm/rcar-du/rcar_du_drv.h         |  2 -
 drivers/gpu/drm/rcar-du/rcar_du_regs.h        |  3 +-
 drivers/iommu/ipmmu-vmsa.c                    |  1 -
 .../platform/renesas/rcar-vin/rcar-core.c     | 36 -------------
 .../platform/renesas/rcar-vin/rcar-csi2.c     | 15 ++----
 drivers/media/platform/renesas/rcar_fdp1.c    |  4 --
 drivers/mmc/host/renesas_sdhi_internal_dmac.c | 10 ++--
 drivers/net/ethernet/renesas/ravb_main.c      | 15 ------
 drivers/thermal/rcar_gen3_thermal.c           | 52 +------------------
 drivers/usb/gadget/udc/renesas_usb3.c         | 23 +-------
 drivers/usb/host/xhci-rcar.c                  | 34 +-----------
 13 files changed, 16 insertions(+), 264 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 09/11] usb: host: xhci-rcar: remove leftover quirk handling
  2023-03-07 16:30 [PATCH 00/11] tree-wide: remove support for Renesas R-Car H3 ES1 Wolfram Sang
@ 2023-03-07 16:30 ` Wolfram Sang
  2023-03-07 16:30 ` [PATCH 10/11] usb: host: xhci-rcar: remove R-Car H3 ES1.* handling Wolfram Sang
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2023-03-07 16:30 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, Geert Uytterhoeven, Mathias Nyman,
	Greg Kroah-Hartman, Yoshihiro Shimoda, linux-usb, linux-kernel

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 <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
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;
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 10/11] usb: host: xhci-rcar: remove R-Car H3 ES1.* handling
  2023-03-07 16:30 [PATCH 00/11] tree-wide: remove support for Renesas R-Car H3 ES1 Wolfram Sang
  2023-03-07 16:30 ` [PATCH 09/11] usb: host: xhci-rcar: remove leftover quirk handling Wolfram Sang
@ 2023-03-07 16:30 ` Wolfram Sang
  2023-03-07 16:30 ` [PATCH 11/11] usb: gadget: udc: renesas_usb3: " Wolfram Sang
  2023-03-09  7:30 ` [PATCH 00/11] tree-wide: remove support for Renesas R-Car H3 ES1 patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2023-03-07 16:30 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, Laurent Pinchart, Geert Uytterhoeven, Mathias Nyman,
	Greg Kroah-Hartman, linux-usb, linux-kernel

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 <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
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 <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/usb/phy.h>
-#include <linux/sys_soc.h>
 
 #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;
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 11/11] usb: gadget: udc: renesas_usb3: remove R-Car H3 ES1.* handling
  2023-03-07 16:30 [PATCH 00/11] tree-wide: remove support for Renesas R-Car H3 ES1 Wolfram Sang
  2023-03-07 16:30 ` [PATCH 09/11] usb: host: xhci-rcar: remove leftover quirk handling Wolfram Sang
  2023-03-07 16:30 ` [PATCH 10/11] usb: host: xhci-rcar: remove R-Car H3 ES1.* handling Wolfram Sang
@ 2023-03-07 16:30 ` Wolfram Sang
  2023-03-09  7:30 ` [PATCH 00/11] tree-wide: remove support for Renesas R-Car H3 ES1 patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2023-03-07 16:30 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, Laurent Pinchart, Geert Uytterhoeven,
	Greg Kroah-Hartman, linux-usb, linux-kernel

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 <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
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 <linux/sizes.h>
 #include <linux/slab.h>
 #include <linux/string.h>
-#include <linux/sys_soc.h>
 #include <linux/uaccess.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
@@ -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)
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 00/11] tree-wide: remove support for Renesas R-Car H3 ES1
  2023-03-07 16:30 [PATCH 00/11] tree-wide: remove support for Renesas R-Car H3 ES1 Wolfram Sang
                   ` (2 preceding siblings ...)
  2023-03-07 16:30 ` [PATCH 11/11] usb: gadget: udc: renesas_usb3: " Wolfram Sang
@ 2023-03-09  7:30 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-03-09  7:30 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, dri-devel, iommu, linux-kernel, linux-media,
	linux-mmc, linux-pm, linux-usb, netdev

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue,  7 Mar 2023 17:30:28 +0100 you wrote:
> Because H3 ES1 becomes an increasing maintenance burden and was only available
> to a development group, we decided to remove upstream support for it. Here are
> the patches to remove driver changes. Review tags have been gathered before
> during an internal discussion. Only change since the internal version is a
> plain rebase to v6.3-rc1. A branch with all removals is here:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/h3es1-removal
> 
> [...]

Here is the summary with links:
  - [07/11] ravb: remove R-Car H3 ES1.* handling
    https://git.kernel.org/netdev/net-next/c/6bf0ad7f2917

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-09  7:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-07 16:30 [PATCH 00/11] tree-wide: remove support for Renesas R-Car H3 ES1 Wolfram Sang
2023-03-07 16:30 ` [PATCH 09/11] usb: host: xhci-rcar: remove leftover quirk handling Wolfram Sang
2023-03-07 16:30 ` [PATCH 10/11] usb: host: xhci-rcar: remove R-Car H3 ES1.* handling Wolfram Sang
2023-03-07 16:30 ` [PATCH 11/11] usb: gadget: udc: renesas_usb3: " Wolfram Sang
2023-03-09  7:30 ` [PATCH 00/11] tree-wide: remove support for Renesas R-Car H3 ES1 patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).