difos/target/linux/bcm27xx/patches-6.12/950-0376-dmaengine-bcm2835-Add-BCM2712-support.patch
Álvaro Fernández Rojas 8f9e91ad03 bcm27xx: add 6.12 patches from RPi repo
These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.12.y
With the following command:
git format-patch -N v6.12.27..HEAD
(HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e)

Exceptions:
- (def)configs patches
- github workflows patches
- applied & reverted patches
- readme patches
- wireless patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-05-21 11:32:18 +02:00

36 lines
1.3 KiB
Diff

From 0b8da860fb87096bdb4b85e3748d8f60cf8df232 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Wed, 8 Mar 2023 16:53:38 +0000
Subject: [PATCH] dmaengine: bcm2835: Add BCM2712 support
BCM2712 has 6 40-bit channels - DMA6 to DMA11. Add a new compatible
string to indicate that the current platform is BCM2712.
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/dma/bcm2835-dma.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/dma/bcm2835-dma.c
+++ b/drivers/dma/bcm2835-dma.c
@@ -331,6 +331,12 @@ static const struct bcm2835_dma_cfg_data
.dma_mask = DMA_BIT_MASK(36),
};
+static const struct bcm2835_dma_cfg_data bcm2712_dma_cfg = {
+ .chan_40bit_mask = BIT(6) | BIT(7) | BIT(8) | BIT(9) |
+ BIT(10) | BIT(11),
+ .dma_mask = DMA_BIT_MASK(40),
+};
+
static inline size_t bcm2835_dma_max_frame_length(struct bcm2835_chan *c)
{
/* lite and normal channels have different max frame length */
@@ -1211,6 +1217,7 @@ static void bcm2835_dma_free(struct bcm2
static const struct of_device_id bcm2835_dma_of_match[] = {
{ .compatible = "brcm,bcm2835-dma", .data = &bcm2835_dma_cfg },
{ .compatible = "brcm,bcm2711-dma", .data = &bcm2711_dma_cfg },
+ { .compatible = "brcm,bcm2712-dma", .data = &bcm2712_dma_cfg },
{},
};
MODULE_DEVICE_TABLE(of, bcm2835_dma_of_match);