bcm27xx: 6.1: add kernel patches
[openwrt/staging/stintel.git] / target / linux / bcm27xx / patches-6.1 / 950-0714-bcm2835-mmc-Use-phys-addresses-for-slave-DMA-config.patch
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
5
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.
9
10 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
11 ---
12 drivers/mmc/host/bcm2835-mmc.c | 16 +---------------
13 1 file changed, 1 insertion(+), 15 deletions(-)
14
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;
20 struct mmc_host *mmc;
21 - const __be32 *addr;
22 int ret;
23
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);
28
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);
34 goto err;
35 }
36
37 - addr = of_get_address(node, 0, NULL, NULL);
38 - if (!addr) {
39 - dev_err(dev, "could not get DMA-register address\n");
40 - ret = -ENODEV;
41 - goto err;
42 - }
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);
48 -
49 #ifndef FORCE_PIO
50 if (node) {
51 host->dma_chan_rxtx = dma_request_slave_channel(dev, "rx-tx");