summaryrefslogtreecommitdiffstats
path: root/drivers/bcma/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bcma/main.c')
-rw-r--r--drivers/bcma/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index 1f635471f318..2c1798e38abd 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -209,6 +209,8 @@ static void bcma_of_fill_device(struct platform_device *parent,
209 core->dev.of_node = node; 209 core->dev.of_node = node;
210 210
211 core->irq = bcma_of_get_irq(parent, core, 0); 211 core->irq = bcma_of_get_irq(parent, core, 0);
212
213 of_dma_configure(&core->dev, node);
212} 214}
213 215
214unsigned int bcma_core_irq(struct bcma_device *core, int num) 216unsigned int bcma_core_irq(struct bcma_device *core, int num)
@@ -248,12 +250,12 @@ void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core)
248 core->irq = bus->host_pci->irq; 250 core->irq = bus->host_pci->irq;
249 break; 251 break;
250 case BCMA_HOSTTYPE_SOC: 252 case BCMA_HOSTTYPE_SOC:
251 core->dev.dma_mask = &core->dev.coherent_dma_mask; 253 if (IS_ENABLED(CONFIG_OF) && bus->host_pdev) {
252 if (bus->host_pdev) {
253 core->dma_dev = &bus->host_pdev->dev; 254 core->dma_dev = &bus->host_pdev->dev;
254 core->dev.parent = &bus->host_pdev->dev; 255 core->dev.parent = &bus->host_pdev->dev;
255 bcma_of_fill_device(bus->host_pdev, core); 256 bcma_of_fill_device(bus->host_pdev, core);
256 } else { 257 } else {
258 core->dev.dma_mask = &core->dev.coherent_dma_mask;
257 core->dma_dev = &core->dev; 259 core->dma_dev = &core->dev;
258 } 260 }
259 break; 261 break;