e77f398c5dfab7643227c5d6aeaf8bf3227c46ca
[openwrt/staging/nbd.git] / target / linux / ramips / patches-6.1 / 800-dmaengine-mediatek-add-HSDMA-support-for-mt7621.patch
1 From d94fc5ce1dc395747c3934ecffcdec0396583755 Mon Sep 17 00:00:00 2001
2 From: Nick Hainke <vincent@systemli.org>
3 Date: Fri, 26 May 2023 19:46:33 +0200
4 Subject: [PATCH] dmaengine: mediatek: add HSDMA support for mt7621
5
6 Commit 87dd67f496f7 ("staging: mt7621-dma: remove driver from tree")
7 removed the mt7621-dma driver. Move the driver from staging to the
8 folder "drivers/dma/mediatek" containing already other mediatek dma
9 driver implementations and maintain it downstream in OpenWrt.
10
11 This patch will not be sent to upstream linux. It is just a workaround.
12
13 Signed-off-by: Nick Hainke <vincent@systemli.org>
14 ---
15 drivers/dma/mediatek/Kconfig | 6 ++++++
16 drivers/dma/mediatek/Makefile | 1 +
17 2 files changed, 7 insertions(+)
18
19 diff --git a/drivers/dma/mediatek/Kconfig b/drivers/dma/mediatek/Kconfig
20 index 7a46a5455957..1a24d73ce87f 100644
21 --- a/drivers/dma/mediatek/Kconfig
22 +++ b/drivers/dma/mediatek/Kconfig
23 @@ -36,3 +36,9 @@ config MTK_UART_APDMA
24 When SERIAL_8250_MT6577 is enabled, and if you want to use DMA,
25 you can enable the config. The DMA engine can only be used
26 with MediaTek SoCs.
27 +
28 +config MTK_HSDMA
29 + tristate "MTK HSDMA support"
30 + depends on RALINK && SOC_MT7621
31 + select DMA_ENGINE
32 + select DMA_VIRTUAL_CHANNELS
33 diff --git a/drivers/dma/mediatek/Makefile b/drivers/dma/mediatek/Makefile
34 index 5ba39a5edc13..784af039b7c0 100644
35 --- a/drivers/dma/mediatek/Makefile
36 +++ b/drivers/dma/mediatek/Makefile
37 @@ -2,3 +2,4 @@
38 obj-$(CONFIG_MTK_UART_APDMA) += mtk-uart-apdma.o
39 obj-$(CONFIG_MTK_HSDMA) += mtk-hsdma.o
40 obj-$(CONFIG_MTK_CQDMA) += mtk-cqdma.o
41 +obj-$(CONFIG_MTK_HSDMA) += hsdma-mt7621.o
42 --
43 2.40.1
44