openwrt/target/linux/bcm27xx/patches-6.1/950-0714-bcm2835-mmc-Use-phys-addresses-for-slave-DMA-config.patch
Álvaro Fernández Rojas 793f8ab62c bcm27xx: 6.1: add kernel patches
Add kernel patches for version 6.1.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-06-09 19:12:30 +02:00

52 lines
1.7 KiB
Diff

From b4c2f9c2f928b8481d85569ebd4efa419d29cfdb Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Thu, 11 May 2023 16:19:57 +0100
Subject: [PATCH] bcm2835-mmc: 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-mmc.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
--- a/drivers/mmc/host/bcm2835-mmc.c
+++ b/drivers/mmc/host/bcm2835-mmc.c
@@ -1404,7 +1404,6 @@ static int bcm2835_mmc_probe(struct plat
struct resource *iomem;
struct bcm2835_host *host;
struct mmc_host *mmc;
- const __be32 *addr;
int ret;
mmc = mmc_alloc_host(sizeof(*host), dev);
@@ -1417,25 +1416,12 @@ static int bcm2835_mmc_probe(struct plat
host->timeout = msecs_to_jiffies(1000);
spin_lock_init(&host->lock);
- iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- host->ioaddr = devm_ioremap_resource(dev, iomem);
+ host->ioaddr = devm_platform_get_and_ioremap_resource(pdev, 0, &iomem);
if (IS_ERR(host->ioaddr)) {
ret = PTR_ERR(host->ioaddr);
goto err;
}
- addr = of_get_address(node, 0, NULL, NULL);
- if (!addr) {
- dev_err(dev, "could not get DMA-register address\n");
- ret = -ENODEV;
- goto err;
- }
- host->bus_addr = be32_to_cpup(addr);
- pr_debug(" - ioaddr %lx, iomem->start %lx, bus_addr %lx\n",
- (unsigned long)host->ioaddr,
- (unsigned long)iomem->start,
- (unsigned long)host->bus_addr);
-
#ifndef FORCE_PIO
if (node) {
host->dma_chan_rxtx = dma_request_slave_channel(dev, "rx-tx");