From: Shiji Yang <yangshiji66@outlook.com>
Date: Mon, 27 May 2024 08:25:57 +0000
Subject: [PATCH] dma: ralink: add back gdma driver

The upstream staging driver has been removed[1] since kernel v5.17.

[1] 5bfc10690c6c ("staging: ralink-gdma: remove driver from tree")

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
---
 drivers/dma/Kconfig  | 6 ++++++
 drivers/dma/Makefile | 1 +
 2 files changed, 7 insertions(+)

--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -580,6 +580,12 @@ config SOPHGO_CV1800B_DMAMUX
 	  series SoCs.
 	  Say Y here if your board have this soc.
 
+config RALINK_GDMA
+	tristate "RALINK GDMA support"
+	depends on RALINK && !SOC_RT288X
+	select DMA_ENGINE
+	select DMA_VIRTUAL_CHANNELS
+
 config STE_DMA40
 	bool "ST-Ericsson DMA40 support"
 	depends on ARCH_U8500
--- a/drivers/dma/Makefile
+++ b/drivers/dma/Makefile
@@ -69,6 +69,7 @@ obj-$(CONFIG_PL330_DMA) += pl330.o
 obj-$(CONFIG_PLX_DMA) += plx_dma.o
 obj-$(CONFIG_PPC_BESTCOMM) += bestcomm/
 obj-$(CONFIG_PXA_DMA) += pxa_dma.o
+obj-$(CONFIG_RALINK_GDMA) += ralink-gdma.o
 obj-$(CONFIG_RENESAS_DMA) += sh/
 obj-$(CONFIG_SF_PDMA) += sf-pdma/
 obj-$(CONFIG_SOPHGO_CV1800B_DMAMUX) += cv1800b-dmamux.o
