aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ssb/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ssb/main.c')
-rw-r--r--drivers/ssb/main.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index 6ce92e82b64e..7cf8851286b5 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -462,15 +462,18 @@ static int ssb_devices_register(struct ssb_bus *bus)
462#ifdef CONFIG_SSB_PCIHOST 462#ifdef CONFIG_SSB_PCIHOST
463 sdev->irq = bus->host_pci->irq; 463 sdev->irq = bus->host_pci->irq;
464 dev->parent = &bus->host_pci->dev; 464 dev->parent = &bus->host_pci->dev;
465 sdev->dma_dev = &bus->host_pci->dev;
465#endif 466#endif
466 break; 467 break;
467 case SSB_BUSTYPE_PCMCIA: 468 case SSB_BUSTYPE_PCMCIA:
468#ifdef CONFIG_SSB_PCMCIAHOST 469#ifdef CONFIG_SSB_PCMCIAHOST
469 sdev->irq = bus->host_pcmcia->irq.AssignedIRQ; 470 sdev->irq = bus->host_pcmcia->irq.AssignedIRQ;
470 dev->parent = &bus->host_pcmcia->dev; 471 dev->parent = &bus->host_pcmcia->dev;
472 sdev->dma_dev = &bus->host_pcmcia->dev;
471#endif 473#endif
472 break; 474 break;
473 case SSB_BUSTYPE_SSB: 475 case SSB_BUSTYPE_SSB:
476 sdev->dma_dev = dev;
474 break; 477 break;
475 } 478 }
476 479
@@ -1164,15 +1167,14 @@ EXPORT_SYMBOL(ssb_dma_translation);
1164 1167
1165int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask) 1168int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask)
1166{ 1169{
1167 struct device *dev = ssb_dev->dev; 1170 struct device *dma_dev = ssb_dev->dma_dev;
1168 1171
1169#ifdef CONFIG_SSB_PCIHOST 1172#ifdef CONFIG_SSB_PCIHOST
1170 if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI && 1173 if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI)
1171 !dma_supported(dev, mask)) 1174 return dma_set_mask(dma_dev, mask);
1172 return -EIO;
1173#endif 1175#endif
1174 dev->coherent_dma_mask = mask; 1176 dma_dev->coherent_dma_mask = mask;
1175 dev->dma_mask = &dev->coherent_dma_mask; 1177 dma_dev->dma_mask = &dma_dev->coherent_dma_mask;
1176 1178
1177 return 0; 1179 return 0;
1178} 1180}