|
@@ -209,6 +209,8 @@ static void bcma_of_fill_device(struct platform_device *parent,
|
|
|
core->dev.of_node = node;
|
|
|
|
|
|
core->irq = bcma_of_get_irq(parent, core, 0);
|
|
|
+
|
|
|
+ of_dma_configure(&core->dev, node);
|
|
|
}
|
|
|
|
|
|
unsigned 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)
|
|
|
core->irq = bus->host_pci->irq;
|
|
|
break;
|
|
|
case BCMA_HOSTTYPE_SOC:
|
|
|
- core->dev.dma_mask = &core->dev.coherent_dma_mask;
|
|
|
- if (bus->host_pdev) {
|
|
|
+ if (IS_ENABLED(CONFIG_OF) && bus->host_pdev) {
|
|
|
core->dma_dev = &bus->host_pdev->dev;
|
|
|
core->dev.parent = &bus->host_pdev->dev;
|
|
|
bcma_of_fill_device(bus->host_pdev, core);
|
|
|
} else {
|
|
|
+ core->dev.dma_mask = &core->dev.coherent_dma_mask;
|
|
|
core->dma_dev = &core->dev;
|
|
|
}
|
|
|
break;
|