1 From b4c2f9c2f928b8481d85569ebd4efa419d29cfdb Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Thu, 11 May 2023 16:19:57 +0100
4 Subject: [PATCH] bcm2835-mmc: Use phys addresses for slave DMA config
6 Contrary to what struct snd_dmaengine_dai_dma_data suggests, the
7 configuration of addresses of DMA slave interfaces should be done in
8 CPU physical addresses.
10 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
12 drivers/mmc/host/bcm2835-mmc.c | 16 +---------------
13 1 file changed, 1 insertion(+), 15 deletions(-)
15 --- a/drivers/mmc/host/bcm2835-mmc.c
16 +++ b/drivers/mmc/host/bcm2835-mmc.c
17 @@ -1404,7 +1404,6 @@ static int bcm2835_mmc_probe(struct plat
18 struct resource *iomem;
19 struct bcm2835_host *host;
24 mmc = mmc_alloc_host(sizeof(*host), dev);
25 @@ -1417,25 +1416,12 @@ static int bcm2835_mmc_probe(struct plat
26 host->timeout = msecs_to_jiffies(1000);
27 spin_lock_init(&host->lock);
29 - iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
30 - host->ioaddr = devm_ioremap_resource(dev, iomem);
31 + host->ioaddr = devm_platform_get_and_ioremap_resource(pdev, 0, &iomem);
32 if (IS_ERR(host->ioaddr)) {
33 ret = PTR_ERR(host->ioaddr);
37 - addr = of_get_address(node, 0, NULL, NULL);
39 - dev_err(dev, "could not get DMA-register address\n");
43 - host->bus_addr = be32_to_cpup(addr);
44 - pr_debug(" - ioaddr %lx, iomem->start %lx, bus_addr %lx\n",
45 - (unsigned long)host->ioaddr,
46 - (unsigned long)iomem->start,
47 - (unsigned long)host->bus_addr);
51 host->dma_chan_rxtx = dma_request_slave_channel(dev, "rx-tx");