mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
bcm2835-smi: 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>
This commit is contained in:
@@ -64,7 +64,7 @@ struct bcm2835_smi_instance {
|
||||
struct device *dev;
|
||||
struct smi_settings settings;
|
||||
__iomem void *smi_regs_ptr;
|
||||
dma_addr_t smi_regs_busaddr;
|
||||
phys_addr_t smi_regs_busaddr;
|
||||
|
||||
struct dma_chan *dma_chan;
|
||||
struct dma_slave_config dma_config;
|
||||
@@ -858,7 +858,6 @@ static int bcm2835_smi_probe(struct platform_device *pdev)
|
||||
struct device_node *node = dev->of_node;
|
||||
struct resource *ioresource;
|
||||
struct bcm2835_smi_instance *inst;
|
||||
const __be32 *addr;
|
||||
|
||||
/* We require device tree support */
|
||||
if (!node)
|
||||
@@ -872,14 +871,13 @@ static int bcm2835_smi_probe(struct platform_device *pdev)
|
||||
inst->dev = dev;
|
||||
spin_lock_init(&inst->transaction_lock);
|
||||
|
||||
ioresource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
inst->smi_regs_ptr = devm_ioremap_resource(dev, ioresource);
|
||||
inst->smi_regs_ptr = devm_platform_get_and_ioremap_resource(pdev, 0,
|
||||
&ioresource);
|
||||
if (IS_ERR(inst->smi_regs_ptr)) {
|
||||
err = PTR_ERR(inst->smi_regs_ptr);
|
||||
goto err;
|
||||
}
|
||||
addr = of_get_address(node, 0, NULL, NULL);
|
||||
inst->smi_regs_busaddr = be32_to_cpu(*addr);
|
||||
inst->smi_regs_busaddr = ioresource->start;
|
||||
|
||||
err = bcm2835_smi_dma_setup(inst);
|
||||
if (err)
|
||||
|
||||
Reference in New Issue
Block a user