Commit 8c95b74d authored by Rafał Miłecki's avatar Rafał Miłecki Committed by John W. Linville

b43legacy: dma: cache translation (routing bits)

Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Tested-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent bb78c71d
...@@ -532,6 +532,8 @@ struct b43legacy_dma { ...@@ -532,6 +532,8 @@ struct b43legacy_dma {
struct b43legacy_dmaring *rx_ring0; struct b43legacy_dmaring *rx_ring0;
struct b43legacy_dmaring *rx_ring3; /* only on core.rev < 5 */ struct b43legacy_dmaring *rx_ring3; /* only on core.rev < 5 */
u32 translation; /* Routing bits */
}; };
/* Data structures for PIO transmission, per 80211 core. */ /* Data structures for PIO transmission, per 80211 core. */
......
...@@ -73,7 +73,7 @@ static void op32_fill_descriptor(struct b43legacy_dmaring *ring, ...@@ -73,7 +73,7 @@ static void op32_fill_descriptor(struct b43legacy_dmaring *ring,
addr = (u32)(dmaaddr & ~SSB_DMA_TRANSLATION_MASK); addr = (u32)(dmaaddr & ~SSB_DMA_TRANSLATION_MASK);
addrext = (u32)(dmaaddr & SSB_DMA_TRANSLATION_MASK) addrext = (u32)(dmaaddr & SSB_DMA_TRANSLATION_MASK)
>> SSB_DMA_TRANSLATION_SHIFT; >> SSB_DMA_TRANSLATION_SHIFT;
addr |= ssb_dma_translation(ring->dev->dev); addr |= ring->dev->dma.translation;
ctl = (bufsize - ring->frameoffset) ctl = (bufsize - ring->frameoffset)
& B43legacy_DMA32_DCTL_BYTECNT; & B43legacy_DMA32_DCTL_BYTECNT;
if (slot == ring->nr_slots - 1) if (slot == ring->nr_slots - 1)
...@@ -175,7 +175,7 @@ static void op64_fill_descriptor(struct b43legacy_dmaring *ring, ...@@ -175,7 +175,7 @@ static void op64_fill_descriptor(struct b43legacy_dmaring *ring,
addrhi = (((u64)dmaaddr >> 32) & ~SSB_DMA_TRANSLATION_MASK); addrhi = (((u64)dmaaddr >> 32) & ~SSB_DMA_TRANSLATION_MASK);
addrext = (((u64)dmaaddr >> 32) & SSB_DMA_TRANSLATION_MASK) addrext = (((u64)dmaaddr >> 32) & SSB_DMA_TRANSLATION_MASK)
>> SSB_DMA_TRANSLATION_SHIFT; >> SSB_DMA_TRANSLATION_SHIFT;
addrhi |= ssb_dma_translation(ring->dev->dev); addrhi |= ring->dev->dma.translation;
if (slot == ring->nr_slots - 1) if (slot == ring->nr_slots - 1)
ctl0 |= B43legacy_DMA64_DCTL0_DTABLEEND; ctl0 |= B43legacy_DMA64_DCTL0_DTABLEEND;
if (start) if (start)
...@@ -709,7 +709,7 @@ static int dmacontroller_setup(struct b43legacy_dmaring *ring) ...@@ -709,7 +709,7 @@ static int dmacontroller_setup(struct b43legacy_dmaring *ring)
int err = 0; int err = 0;
u32 value; u32 value;
u32 addrext; u32 addrext;
u32 trans = ssb_dma_translation(ring->dev->dev); u32 trans = ring->dev->dma.translation;
if (ring->tx) { if (ring->tx) {
if (ring->type == B43legacy_DMA_64BIT) { if (ring->type == B43legacy_DMA_64BIT) {
...@@ -1093,6 +1093,7 @@ int b43legacy_dma_init(struct b43legacy_wldev *dev) ...@@ -1093,6 +1093,7 @@ int b43legacy_dma_init(struct b43legacy_wldev *dev)
return -EOPNOTSUPP; return -EOPNOTSUPP;
#endif #endif
} }
dma->translation = ssb_dma_translation(dev->dev);
err = -ENOMEM; err = -ENOMEM;
/* setup TX DMA channels. */ /* setup TX DMA channels. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment