0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2025-09-18 05:09:23 +00:00
Files
openwrt/target/linux/bcm27xx/patches-6.12/950-0325-mmc-bcm2835-Use-phys-addresses-for-slave-DMA-config.patch
Leo Barsky b6276e33eb kernel: bump 6.12 to 6.12.40
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.40
Removed upstreamed patches:
   generic/pending-6.12/680-net-fix-TCP-UDP-fraglist-GRO.patch
   generic/pending-6.12/802-nvmem-u-boot-env-align-endianness-of-crc32-values.patch
1- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.40&id=7c532f222361191fe228e54c5d3e0026fef8a5a0
2- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.40&id=c29a2328af96338d327cd851803338423c6f07a1
All other patches auto-refreshed.

Signed-off-by: Leo Barsky <leobrsky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/19514
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-26 01:00:09 +02:00

61 lines
1.8 KiB
Diff

From b55b191394968342c6ed9204b3e4faf94cf2cf5b Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Thu, 11 May 2023 16:25:46 +0100
Subject: [PATCH] mmc: bcm2835: Use phys addresses for slave DMA config
Contrary to what struct snd_dmaengine_dai_dma_data suggests, the
configuration of addresses of DMA slave interfaces should be done in
CPU physical addresses.
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/mmc/host/bcm2835.c | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
--- a/drivers/mmc/host/bcm2835.c
+++ b/drivers/mmc/host/bcm2835.c
@@ -38,7 +38,6 @@
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/module.h>
-#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/scatterlist.h>
@@ -1348,8 +1347,8 @@ static int bcm2835_probe(struct platform
struct device *dev = &pdev->dev;
struct clk *clk;
struct bcm2835_host *host;
+ struct resource *iomem;
struct mmc_host *mmc;
- const __be32 *regaddr_p;
int ret;
dev_dbg(dev, "%s\n", __func__);
@@ -1362,23 +1361,13 @@ static int bcm2835_probe(struct platform
host->pdev = pdev;
spin_lock_init(&host->lock);
- host->ioaddr = devm_platform_ioremap_resource(pdev, 0);
+ host->ioaddr = devm_platform_get_and_ioremap_resource(pdev, 0, &iomem);
if (IS_ERR(host->ioaddr)) {
ret = PTR_ERR(host->ioaddr);
goto err;
}
- /* Parse OF address directly to get the physical address for
- * DMA to our registers.
- */
- regaddr_p = of_get_address(pdev->dev.of_node, 0, NULL, NULL);
- if (!regaddr_p) {
- dev_err(dev, "Can't get phys address\n");
- ret = -EINVAL;
- goto err;
- }
-
- host->phys_addr = be32_to_cpup(regaddr_p);
+ host->phys_addr = iomem->start;
host->dma_chan = NULL;
host->dma_desc = NULL;