2 drivers/net/b44.c | 146 +++++++++++++++------------------
3 drivers/ssb/driver_chipcommon.c | 24 +++++
4 drivers/ssb/driver_chipcommon_pmu.c | 17 +--
5 drivers/ssb/main.c | 76 -----------------
6 include/linux/ssb/ssb.h | 159 ------------------------------------
7 5 files changed, 104 insertions(+), 318 deletions(-)
9 --- a/drivers/net/b44.c
10 +++ b/drivers/net/b44.c
11 @@ -135,7 +135,6 @@ static void b44_init_rings(struct b44 *)
13 static void b44_init_hw(struct b44 *, int);
15 -static int dma_desc_align_mask;
16 static int dma_desc_sync_size;
19 @@ -150,9 +149,8 @@ static inline void b44_sync_dma_desc_for
21 enum dma_data_direction dir)
23 - ssb_dma_sync_single_range_for_device(sdev, dma_base,
24 - offset & dma_desc_align_mask,
25 - dma_desc_sync_size, dir);
26 + dma_sync_single_for_device(sdev->dma_dev, dma_base + offset,
27 + dma_desc_sync_size, dir);
30 static inline void b44_sync_dma_desc_for_cpu(struct ssb_device *sdev,
31 @@ -160,9 +158,8 @@ static inline void b44_sync_dma_desc_for
33 enum dma_data_direction dir)
35 - ssb_dma_sync_single_range_for_cpu(sdev, dma_base,
36 - offset & dma_desc_align_mask,
37 - dma_desc_sync_size, dir);
38 + dma_sync_single_for_cpu(sdev->dma_dev, dma_base + offset,
39 + dma_desc_sync_size, dir);
42 static inline unsigned long br32(const struct b44 *bp, unsigned long reg)
43 @@ -608,10 +605,10 @@ static void b44_tx(struct b44 *bp)
47 - ssb_dma_unmap_single(bp->sdev,
51 + dma_unmap_single(bp->sdev->dma_dev,
56 dev_kfree_skb_irq(skb);
58 @@ -648,29 +645,29 @@ static int b44_alloc_rx_skb(struct b44 *
62 - mapping = ssb_dma_map_single(bp->sdev, skb->data,
65 + mapping = dma_map_single(bp->sdev->dma_dev, skb->data,
69 /* Hardware bug work-around, the chip is unable to do PCI DMA
70 to/from anything above 1GB :-( */
71 - if (ssb_dma_mapping_error(bp->sdev, mapping) ||
72 + if (dma_mapping_error(bp->sdev->dma_dev, mapping) ||
73 mapping + RX_PKT_BUF_SZ > DMA_BIT_MASK(30)) {
75 - if (!ssb_dma_mapping_error(bp->sdev, mapping))
76 - ssb_dma_unmap_single(bp->sdev, mapping,
77 + if (!dma_mapping_error(bp->sdev->dma_dev, mapping))
78 + dma_unmap_single(bp->sdev->dma_dev, mapping,
79 RX_PKT_BUF_SZ, DMA_FROM_DEVICE);
80 dev_kfree_skb_any(skb);
81 skb = __netdev_alloc_skb(bp->dev, RX_PKT_BUF_SZ, GFP_ATOMIC|GFP_DMA);
84 - mapping = ssb_dma_map_single(bp->sdev, skb->data,
87 - if (ssb_dma_mapping_error(bp->sdev, mapping) ||
88 - mapping + RX_PKT_BUF_SZ > DMA_BIT_MASK(30)) {
89 - if (!ssb_dma_mapping_error(bp->sdev, mapping))
90 - ssb_dma_unmap_single(bp->sdev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE);
91 + mapping = dma_map_single(bp->sdev->dma_dev, skb->data,
94 + if (dma_mapping_error(bp->sdev->dma_dev, mapping) ||
95 + mapping + RX_PKT_BUF_SZ > DMA_BIT_MASK(30)) {
96 + if (!dma_mapping_error(bp->sdev->dma_dev, mapping))
97 + dma_unmap_single(bp->sdev->dma_dev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE);
98 dev_kfree_skb_any(skb);
101 @@ -745,9 +742,9 @@ static void b44_recycle_rx(struct b44 *b
102 dest_idx * sizeof(*dest_desc),
105 - ssb_dma_sync_single_for_device(bp->sdev, dest_map->mapping,
108 + dma_sync_single_for_device(bp->sdev->dma_dev, dest_map->mapping,
113 static int b44_rx(struct b44 *bp, int budget)
114 @@ -767,9 +764,9 @@ static int b44_rx(struct b44 *bp, int bu
115 struct rx_header *rh;
118 - ssb_dma_sync_single_for_cpu(bp->sdev, map,
121 + dma_sync_single_for_cpu(bp->sdev->dma_dev, map,
124 rh = (struct rx_header *) skb->data;
125 len = le16_to_cpu(rh->len);
126 if ((len > (RX_PKT_BUF_SZ - RX_PKT_OFFSET)) ||
127 @@ -801,8 +798,8 @@ static int b44_rx(struct b44 *bp, int bu
128 skb_size = b44_alloc_rx_skb(bp, cons, bp->rx_prod);
131 - ssb_dma_unmap_single(bp->sdev, map,
132 - skb_size, DMA_FROM_DEVICE);
133 + dma_unmap_single(bp->sdev->dma_dev, map,
134 + skb_size, DMA_FROM_DEVICE);
135 /* Leave out rx_header */
136 skb_put(skb, len + RX_PKT_OFFSET);
137 skb_pull(skb, RX_PKT_OFFSET);
138 @@ -954,24 +951,24 @@ static netdev_tx_t b44_start_xmit(struct
142 - mapping = ssb_dma_map_single(bp->sdev, skb->data, len, DMA_TO_DEVICE);
143 - if (ssb_dma_mapping_error(bp->sdev, mapping) || mapping + len > DMA_BIT_MASK(30)) {
144 + mapping = dma_map_single(bp->sdev->dma_dev, skb->data, len, DMA_TO_DEVICE);
145 + if (dma_mapping_error(bp->sdev->dma_dev, mapping) || mapping + len > DMA_BIT_MASK(30)) {
146 struct sk_buff *bounce_skb;
148 /* Chip can't handle DMA to/from >1GB, use bounce buffer */
149 - if (!ssb_dma_mapping_error(bp->sdev, mapping))
150 - ssb_dma_unmap_single(bp->sdev, mapping, len,
151 + if (!dma_mapping_error(bp->sdev->dma_dev, mapping))
152 + dma_unmap_single(bp->sdev->dma_dev, mapping, len,
155 bounce_skb = __netdev_alloc_skb(dev, len, GFP_ATOMIC | GFP_DMA);
159 - mapping = ssb_dma_map_single(bp->sdev, bounce_skb->data,
160 - len, DMA_TO_DEVICE);
161 - if (ssb_dma_mapping_error(bp->sdev, mapping) || mapping + len > DMA_BIT_MASK(30)) {
162 - if (!ssb_dma_mapping_error(bp->sdev, mapping))
163 - ssb_dma_unmap_single(bp->sdev, mapping,
164 + mapping = dma_map_single(bp->sdev->dma_dev, bounce_skb->data,
165 + len, DMA_TO_DEVICE);
166 + if (dma_mapping_error(bp->sdev->dma_dev, mapping) || mapping + len > DMA_BIT_MASK(30)) {
167 + if (!dma_mapping_error(bp->sdev->dma_dev, mapping))
168 + dma_unmap_single(bp->sdev->dma_dev, mapping,
170 dev_kfree_skb_any(bounce_skb);
172 @@ -1068,8 +1065,8 @@ static void b44_free_rings(struct b44 *b
176 - ssb_dma_unmap_single(bp->sdev, rp->mapping, RX_PKT_BUF_SZ,
178 + dma_unmap_single(bp->sdev->dma_dev, rp->mapping, RX_PKT_BUF_SZ,
180 dev_kfree_skb_any(rp->skb);
183 @@ -1080,8 +1077,8 @@ static void b44_free_rings(struct b44 *b
187 - ssb_dma_unmap_single(bp->sdev, rp->mapping, rp->skb->len,
189 + dma_unmap_single(bp->sdev->dma_dev, rp->mapping, rp->skb->len,
191 dev_kfree_skb_any(rp->skb);
194 @@ -1103,14 +1100,12 @@ static void b44_init_rings(struct b44 *b
195 memset(bp->tx_ring, 0, B44_TX_RING_BYTES);
197 if (bp->flags & B44_FLAG_RX_RING_HACK)
198 - ssb_dma_sync_single_for_device(bp->sdev, bp->rx_ring_dma,
200 - DMA_BIDIRECTIONAL);
201 + dma_sync_single_for_device(bp->sdev->dma_dev, bp->rx_ring_dma,
202 + DMA_TABLE_BYTES, DMA_BIDIRECTIONAL);
204 if (bp->flags & B44_FLAG_TX_RING_HACK)
205 - ssb_dma_sync_single_for_device(bp->sdev, bp->tx_ring_dma,
208 + dma_sync_single_for_device(bp->sdev->dma_dev, bp->tx_ring_dma,
209 + DMA_TABLE_BYTES, DMA_TO_DEVICE);
211 for (i = 0; i < bp->rx_pending; i++) {
212 if (b44_alloc_rx_skb(bp, -1, i) < 0)
213 @@ -1130,27 +1125,23 @@ static void b44_free_consistent(struct b
214 bp->tx_buffers = NULL;
216 if (bp->flags & B44_FLAG_RX_RING_HACK) {
217 - ssb_dma_unmap_single(bp->sdev, bp->rx_ring_dma,
219 - DMA_BIDIRECTIONAL);
220 + dma_unmap_single(bp->sdev->dma_dev, bp->rx_ring_dma,
221 + DMA_TABLE_BYTES, DMA_BIDIRECTIONAL);
224 - ssb_dma_free_consistent(bp->sdev, DMA_TABLE_BYTES,
225 - bp->rx_ring, bp->rx_ring_dma,
227 + dma_free_coherent(bp->sdev->dma_dev, DMA_TABLE_BYTES,
228 + bp->rx_ring, bp->rx_ring_dma);
230 bp->flags &= ~B44_FLAG_RX_RING_HACK;
233 if (bp->flags & B44_FLAG_TX_RING_HACK) {
234 - ssb_dma_unmap_single(bp->sdev, bp->tx_ring_dma,
237 + dma_unmap_single(bp->sdev->dma_dev, bp->tx_ring_dma,
238 + DMA_TABLE_BYTES, DMA_TO_DEVICE);
241 - ssb_dma_free_consistent(bp->sdev, DMA_TABLE_BYTES,
242 - bp->tx_ring, bp->tx_ring_dma,
244 + dma_free_coherent(bp->sdev->dma_dev, DMA_TABLE_BYTES,
245 + bp->tx_ring, bp->tx_ring_dma);
247 bp->flags &= ~B44_FLAG_TX_RING_HACK;
249 @@ -1175,7 +1166,8 @@ static int b44_alloc_consistent(struct b
252 size = DMA_TABLE_BYTES;
253 - bp->rx_ring = ssb_dma_alloc_consistent(bp->sdev, size, &bp->rx_ring_dma, gfp);
254 + bp->rx_ring = dma_alloc_coherent(bp->sdev->dma_dev, size,
255 + &bp->rx_ring_dma, gfp);
257 /* Allocation may have failed due to pci_alloc_consistent
258 insisting on use of GFP_DMA, which is more restrictive
259 @@ -1187,11 +1179,11 @@ static int b44_alloc_consistent(struct b
263 - rx_ring_dma = ssb_dma_map_single(bp->sdev, rx_ring,
265 - DMA_BIDIRECTIONAL);
266 + rx_ring_dma = dma_map_single(bp->sdev->dma_dev, rx_ring,
268 + DMA_BIDIRECTIONAL);
270 - if (ssb_dma_mapping_error(bp->sdev, rx_ring_dma) ||
271 + if (dma_mapping_error(bp->sdev->dma_dev, rx_ring_dma) ||
272 rx_ring_dma + size > DMA_BIT_MASK(30)) {
275 @@ -1202,7 +1194,8 @@ static int b44_alloc_consistent(struct b
276 bp->flags |= B44_FLAG_RX_RING_HACK;
279 - bp->tx_ring = ssb_dma_alloc_consistent(bp->sdev, size, &bp->tx_ring_dma, gfp);
280 + bp->tx_ring = dma_alloc_coherent(bp->sdev->dma_dev, size,
281 + &bp->tx_ring_dma, gfp);
283 /* Allocation may have failed due to ssb_dma_alloc_consistent
284 insisting on use of GFP_DMA, which is more restrictive
285 @@ -1214,11 +1207,11 @@ static int b44_alloc_consistent(struct b
289 - tx_ring_dma = ssb_dma_map_single(bp->sdev, tx_ring,
292 + tx_ring_dma = dma_map_single(bp->sdev->dma_dev, tx_ring,
296 - if (ssb_dma_mapping_error(bp->sdev, tx_ring_dma) ||
297 + if (dma_mapping_error(bp->sdev->dma_dev, tx_ring_dma) ||
298 tx_ring_dma + size > DMA_BIT_MASK(30)) {
301 @@ -2176,12 +2169,14 @@ static int __devinit b44_init_one(struct
302 "Failed to powerup the bus\n");
303 goto err_out_free_dev;
305 - err = ssb_dma_set_mask(sdev, DMA_BIT_MASK(30));
308 + if (dma_set_mask(sdev->dma_dev, DMA_BIT_MASK(30)) ||
309 + dma_set_coherent_mask(sdev->dma_dev, DMA_BIT_MASK(30))) {
311 "Required 30BIT DMA mask unsupported by the system\n");
312 goto err_out_powerdown;
315 err = b44_get_invariants(bp);
318 @@ -2344,7 +2339,6 @@ static int __init b44_init(void)
321 /* Setup paramaters for syncing RX/TX DMA descriptors */
322 - dma_desc_align_mask = ~(dma_desc_align_size - 1);
323 dma_desc_sync_size = max_t(unsigned int, dma_desc_align_size, sizeof(struct dma_desc));
325 err = b44_pci_init();
326 --- a/drivers/ssb/driver_chipcommon.c
327 +++ b/drivers/ssb/driver_chipcommon.c
328 @@ -209,6 +209,24 @@ static void chipco_powercontrol_init(str
332 +/* http://bcm-v4.sipsolutions.net/802.11/PmuFastPwrupDelay */
333 +static u16 pmu_fast_powerup_delay(struct ssb_chipcommon *cc)
335 + struct ssb_bus *bus = cc->dev->bus;
337 + switch (bus->chip_id) {
349 +/* http://bcm-v4.sipsolutions.net/802.11/ClkctlFastPwrupDelay */
350 static void calc_fast_powerup_delay(struct ssb_chipcommon *cc)
352 struct ssb_bus *bus = cc->dev->bus;
353 @@ -218,6 +236,12 @@ static void calc_fast_powerup_delay(stru
355 if (bus->bustype != SSB_BUSTYPE_PCI)
358 + if (cc->capabilities & SSB_CHIPCO_CAP_PMU) {
359 + cc->fast_pwrup_delay = pmu_fast_powerup_delay(cc);
363 if (!(cc->capabilities & SSB_CHIPCO_CAP_PCTL))
366 --- a/drivers/ssb/driver_chipcommon_pmu.c
367 +++ b/drivers/ssb/driver_chipcommon_pmu.c
368 @@ -502,9 +502,9 @@ static void ssb_pmu_resources_init(struc
369 chipco_write32(cc, SSB_CHIPCO_PMU_MAXRES_MSK, max_msk);
372 +/* http://bcm-v4.sipsolutions.net/802.11/SSB/PmuInit */
373 void ssb_pmu_init(struct ssb_chipcommon *cc)
375 - struct ssb_bus *bus = cc->dev->bus;
378 if (!(cc->capabilities & SSB_CHIPCO_CAP_PMU))
379 @@ -516,15 +516,12 @@ void ssb_pmu_init(struct ssb_chipcommon
380 ssb_dprintk(KERN_DEBUG PFX "Found rev %u PMU (capabilities 0x%08X)\n",
381 cc->pmu.rev, pmucap);
383 - if (cc->pmu.rev >= 1) {
384 - if ((bus->chip_id == 0x4325) && (bus->chip_rev < 2)) {
385 - chipco_mask32(cc, SSB_CHIPCO_PMU_CTL,
386 - ~SSB_CHIPCO_PMU_CTL_NOILPONW);
388 - chipco_set32(cc, SSB_CHIPCO_PMU_CTL,
389 - SSB_CHIPCO_PMU_CTL_NOILPONW);
392 + if (cc->pmu.rev == 1)
393 + chipco_mask32(cc, SSB_CHIPCO_PMU_CTL,
394 + ~SSB_CHIPCO_PMU_CTL_NOILPONW);
396 + chipco_set32(cc, SSB_CHIPCO_PMU_CTL,
397 + SSB_CHIPCO_PMU_CTL_NOILPONW);
398 ssb_pmu_pll_init(cc);
399 ssb_pmu_resources_init(cc);
401 --- a/drivers/ssb/main.c
402 +++ b/drivers/ssb/main.c
403 @@ -486,6 +486,7 @@ static int ssb_devices_register(struct s
404 #ifdef CONFIG_SSB_PCIHOST
405 sdev->irq = bus->host_pci->irq;
406 dev->parent = &bus->host_pci->dev;
407 + sdev->dma_dev = dev->parent;
410 case SSB_BUSTYPE_PCMCIA:
411 @@ -501,6 +502,7 @@ static int ssb_devices_register(struct s
413 case SSB_BUSTYPE_SSB:
414 dev->dma_mask = &dev->coherent_dma_mask;
415 + sdev->dma_dev = dev;
419 @@ -1226,80 +1228,6 @@ u32 ssb_dma_translation(struct ssb_devic
421 EXPORT_SYMBOL(ssb_dma_translation);
423 -int ssb_dma_set_mask(struct ssb_device *dev, u64 mask)
425 -#ifdef CONFIG_SSB_PCIHOST
429 - switch (dev->bus->bustype) {
430 - case SSB_BUSTYPE_PCI:
431 -#ifdef CONFIG_SSB_PCIHOST
432 - err = pci_set_dma_mask(dev->bus->host_pci, mask);
435 - err = pci_set_consistent_dma_mask(dev->bus->host_pci, mask);
438 - case SSB_BUSTYPE_SSB:
439 - return dma_set_mask(dev->dev, mask);
441 - __ssb_dma_not_implemented(dev);
445 -EXPORT_SYMBOL(ssb_dma_set_mask);
447 -void * ssb_dma_alloc_consistent(struct ssb_device *dev, size_t size,
448 - dma_addr_t *dma_handle, gfp_t gfp_flags)
450 - switch (dev->bus->bustype) {
451 - case SSB_BUSTYPE_PCI:
452 -#ifdef CONFIG_SSB_PCIHOST
453 - if (gfp_flags & GFP_DMA) {
454 - /* Workaround: The PCI API does not support passing
456 - return dma_alloc_coherent(&dev->bus->host_pci->dev,
457 - size, dma_handle, gfp_flags);
459 - return pci_alloc_consistent(dev->bus->host_pci, size, dma_handle);
461 - case SSB_BUSTYPE_SSB:
462 - return dma_alloc_coherent(dev->dev, size, dma_handle, gfp_flags);
464 - __ssb_dma_not_implemented(dev);
468 -EXPORT_SYMBOL(ssb_dma_alloc_consistent);
470 -void ssb_dma_free_consistent(struct ssb_device *dev, size_t size,
471 - void *vaddr, dma_addr_t dma_handle,
474 - switch (dev->bus->bustype) {
475 - case SSB_BUSTYPE_PCI:
476 -#ifdef CONFIG_SSB_PCIHOST
477 - if (gfp_flags & GFP_DMA) {
478 - /* Workaround: The PCI API does not support passing
480 - dma_free_coherent(&dev->bus->host_pci->dev,
481 - size, vaddr, dma_handle);
484 - pci_free_consistent(dev->bus->host_pci, size,
485 - vaddr, dma_handle);
488 - case SSB_BUSTYPE_SSB:
489 - dma_free_coherent(dev->dev, size, vaddr, dma_handle);
492 - __ssb_dma_not_implemented(dev);
495 -EXPORT_SYMBOL(ssb_dma_free_consistent);
497 int ssb_bus_may_powerdown(struct ssb_bus *bus)
499 struct ssb_chipcommon *cc;
500 --- a/include/linux/ssb/ssb.h
501 +++ b/include/linux/ssb/ssb.h
502 @@ -167,7 +167,7 @@ struct ssb_device {
503 * is an optimization. */
504 const struct ssb_bus_ops *ops;
506 - struct device *dev;
507 + struct device *dev, *dma_dev;
510 struct ssb_device_id id;
511 @@ -470,14 +470,6 @@ extern u32 ssb_dma_translation(struct ss
512 #define SSB_DMA_TRANSLATION_MASK 0xC0000000
513 #define SSB_DMA_TRANSLATION_SHIFT 30
515 -extern int ssb_dma_set_mask(struct ssb_device *dev, u64 mask);
517 -extern void * ssb_dma_alloc_consistent(struct ssb_device *dev, size_t size,
518 - dma_addr_t *dma_handle, gfp_t gfp_flags);
519 -extern void ssb_dma_free_consistent(struct ssb_device *dev, size_t size,
520 - void *vaddr, dma_addr_t dma_handle,
523 static inline void __cold __ssb_dma_not_implemented(struct ssb_device *dev)
525 #ifdef CONFIG_SSB_DEBUG
526 @@ -486,155 +478,6 @@ static inline void __cold __ssb_dma_not_
530 -static inline int ssb_dma_mapping_error(struct ssb_device *dev, dma_addr_t addr)
532 - switch (dev->bus->bustype) {
533 - case SSB_BUSTYPE_PCI:
534 -#ifdef CONFIG_SSB_PCIHOST
535 - return pci_dma_mapping_error(dev->bus->host_pci, addr);
538 - case SSB_BUSTYPE_SSB:
539 - return dma_mapping_error(dev->dev, addr);
543 - __ssb_dma_not_implemented(dev);
547 -static inline dma_addr_t ssb_dma_map_single(struct ssb_device *dev, void *p,
548 - size_t size, enum dma_data_direction dir)
550 - switch (dev->bus->bustype) {
551 - case SSB_BUSTYPE_PCI:
552 -#ifdef CONFIG_SSB_PCIHOST
553 - return pci_map_single(dev->bus->host_pci, p, size, dir);
556 - case SSB_BUSTYPE_SSB:
557 - return dma_map_single(dev->dev, p, size, dir);
561 - __ssb_dma_not_implemented(dev);
565 -static inline void ssb_dma_unmap_single(struct ssb_device *dev, dma_addr_t dma_addr,
566 - size_t size, enum dma_data_direction dir)
568 - switch (dev->bus->bustype) {
569 - case SSB_BUSTYPE_PCI:
570 -#ifdef CONFIG_SSB_PCIHOST
571 - pci_unmap_single(dev->bus->host_pci, dma_addr, size, dir);
575 - case SSB_BUSTYPE_SSB:
576 - dma_unmap_single(dev->dev, dma_addr, size, dir);
581 - __ssb_dma_not_implemented(dev);
584 -static inline void ssb_dma_sync_single_for_cpu(struct ssb_device *dev,
585 - dma_addr_t dma_addr,
587 - enum dma_data_direction dir)
589 - switch (dev->bus->bustype) {
590 - case SSB_BUSTYPE_PCI:
591 -#ifdef CONFIG_SSB_PCIHOST
592 - pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr,
597 - case SSB_BUSTYPE_SSB:
598 - dma_sync_single_for_cpu(dev->dev, dma_addr, size, dir);
603 - __ssb_dma_not_implemented(dev);
606 -static inline void ssb_dma_sync_single_for_device(struct ssb_device *dev,
607 - dma_addr_t dma_addr,
609 - enum dma_data_direction dir)
611 - switch (dev->bus->bustype) {
612 - case SSB_BUSTYPE_PCI:
613 -#ifdef CONFIG_SSB_PCIHOST
614 - pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr,
619 - case SSB_BUSTYPE_SSB:
620 - dma_sync_single_for_device(dev->dev, dma_addr, size, dir);
625 - __ssb_dma_not_implemented(dev);
628 -static inline void ssb_dma_sync_single_range_for_cpu(struct ssb_device *dev,
629 - dma_addr_t dma_addr,
630 - unsigned long offset,
632 - enum dma_data_direction dir)
634 - switch (dev->bus->bustype) {
635 - case SSB_BUSTYPE_PCI:
636 -#ifdef CONFIG_SSB_PCIHOST
637 - /* Just sync everything. That's all the PCI API can do. */
638 - pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr,
639 - offset + size, dir);
643 - case SSB_BUSTYPE_SSB:
644 - dma_sync_single_range_for_cpu(dev->dev, dma_addr, offset,
650 - __ssb_dma_not_implemented(dev);
653 -static inline void ssb_dma_sync_single_range_for_device(struct ssb_device *dev,
654 - dma_addr_t dma_addr,
655 - unsigned long offset,
657 - enum dma_data_direction dir)
659 - switch (dev->bus->bustype) {
660 - case SSB_BUSTYPE_PCI:
661 -#ifdef CONFIG_SSB_PCIHOST
662 - /* Just sync everything. That's all the PCI API can do. */
663 - pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr,
664 - offset + size, dir);
668 - case SSB_BUSTYPE_SSB:
669 - dma_sync_single_range_for_device(dev->dev, dma_addr, offset,
675 - __ssb_dma_not_implemented(dev);
679 #ifdef CONFIG_SSB_PCIHOST
680 /* PCI-host wrapper driver */
681 extern int ssb_pcihost_register(struct pci_driver *driver);