[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240524182702.1317935-15-dave.stevenson@raspberrypi.com>
Date: Fri, 24 May 2024 19:26:58 +0100
From: Dave Stevenson <dave.stevenson@...pberrypi.com>
To: Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>,
Vinod Koul <vkoul@...nel.org>,
Maxime Ripard <mripard@...nel.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Ulf Hansson <ulf.hansson@...aro.org>,
Mark Brown <broonie@...nel.org>,
Christoph Hellwig <hch@....de>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Robin Murphy <robin.murphy@....com>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Vladimir Murzin <vladimir.murzin@....com>,
Phil Elwell <phil@...pberrypi.com>,
Stefan Wahren <wahrenst@....net>,
Serge Semin <Sergey.Semin@...kalelectronics.ru>
Cc: devicetree@...r.kernel.org,
linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
dmaengine@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
linux-mmc@...r.kernel.org,
linux-spi@...r.kernel.org,
iommu@...ts.linux.dev,
linux-sound@...r.kernel.org,
Dave Stevenson <dave.stevenson@...pberrypi.com>
Subject: [PATCH 14/18] mmc: bcm2835: Use phys addresses for slave DMA config
From: Phil Elwell <phil@...pberrypi.com>
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@...pberrypi.com>
Signed-off-by: Dave Stevenson <dave.stevenson@...pberrypi.com>
---
drivers/mmc/host/bcm2835.c | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
index 35d8fdea668b..746a60fac0f0 100644
--- 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>
@@ -1347,8 +1346,8 @@ static int bcm2835_probe(struct platform_device *pdev)
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__);
@@ -1361,23 +1360,13 @@ static int bcm2835_probe(struct platform_device *pdev)
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;
--
2.34.1
Powered by blists - more mailing lists