aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ssb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ssb')
-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 72017bf2e577..8003a9e55ac4 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -436,15 +436,18 @@ static int ssb_devices_register(struct ssb_bus *bus)
436#ifdef CONFIG_SSB_PCIHOST 436#ifdef CONFIG_SSB_PCIHOST
437 sdev->irq = bus->host_pci->irq; 437 sdev->irq = bus->host_pci->irq;
438 dev->parent = &bus->host_pci->dev; 438 dev->parent = &bus->host_pci->dev;
439 sdev->dma_dev = &bus->host_pci->dev;
439#endif 440#endif
440 break; 441 break;
441 case SSB_BUSTYPE_PCMCIA: 442 case SSB_BUSTYPE_PCMCIA:
442#ifdef CONFIG_SSB_PCMCIAHOST 443#ifdef CONFIG_SSB_PCMCIAHOST
443 sdev->irq = bus->host_pcmcia->irq.AssignedIRQ; 444 sdev->irq = bus->host_pcmcia->irq.AssignedIRQ;
444 dev->parent = &bus->host_pcmcia->dev; 445 dev->parent = &bus->host_pcmcia->dev;
446 sdev->dma_dev = &bus->host_pcmcia->dev;
445#endif 447#endif
446 break; 448 break;
447 case SSB_BUSTYPE_SSB: 449 case SSB_BUSTYPE_SSB:
450 sdev->dma_dev = dev;
448 break; 451 break;
449 } 452 }
450 453
@@ -1018,15 +1021,14 @@ EXPORT_SYMBOL(ssb_dma_translation);
1018 1021
1019int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask) 1022int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask)
1020{ 1023{
1021 struct device *dev = ssb_dev->dev; 1024 struct device *dma_dev = ssb_dev->dma_dev;
1022 1025
1023#ifdef CONFIG_SSB_PCIHOST 1026#ifdef CONFIG_SSB_PCIHOST
1024 if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI && 1027 if (ssb_dev->bus->bustype == SSB_BUSTYPE_PCI)
1025 !dma_supported(dev, mask)) 1028 return dma_set_mask(dma_dev, mask);
1026 return -EIO;
1027#endif 1029#endif
1028 dev->coherent_dma_mask = mask; 1030 dma_dev->coherent_dma_mask = mask;
1029 dev->dma_mask = &dev->coherent_dma_mask; 1031 dma_dev->dma_mask = &dma_dev->coherent_dma_mask;
1030 1032
1031 return 0; 1033 return 0;
1032} 1034}