1 From 975bb6f620418ffcfa101561583d6cadc8025a1d Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Thu, 11 May 2023 16:24:26 +0100
4 Subject: [PATCH] bcm2835-sdhost: Use phys addresses for slave DMA
7 Contrary to what struct snd_dmaengine_dai_dma_data suggests, the
8 configuration of addresses of DMA slave interfaces should be done in
9 CPU physical addresses.
11 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
13 drivers/mmc/host/bcm2835-sdhost.c | 17 ++---------------
14 1 file changed, 2 insertions(+), 15 deletions(-)
16 --- a/drivers/mmc/host/bcm2835-sdhost.c
17 +++ b/drivers/mmc/host/bcm2835-sdhost.c
18 @@ -2015,9 +2015,7 @@ static int bcm2835_sdhost_probe(struct p
19 struct resource *iomem;
20 struct bcm2835_host *host;
27 pr_debug("bcm2835_sdhost_probe\n");
28 @@ -2034,24 +2032,13 @@ static int bcm2835_sdhost_probe(struct p
30 spin_lock_init(&host->lock);
32 - iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
33 - host->ioaddr = devm_ioremap_resource(dev, iomem);
34 + host->ioaddr = devm_platform_get_and_ioremap_resource(pdev, 0, &iomem);
35 if (IS_ERR(host->ioaddr)) {
36 ret = PTR_ERR(host->ioaddr);
40 - na = of_n_addr_cells(node);
41 - addr = of_get_address(node, 0, NULL, NULL);
43 - dev_err(dev, "could not get DMA-register address\n");
46 - host->bus_addr = (phys_addr_t)of_read_number(addr, na);
47 - pr_debug(" - ioaddr %lx, iomem->start %lx, bus_addr %lx\n",
48 - (unsigned long)host->ioaddr,
49 - (unsigned long)iomem->start,
50 - (unsigned long)host->bus_addr);
51 + host->bus_addr = iomem->start;
54 /* Read any custom properties */