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

ssb: return correct translation bit for 64-bit DMA

Remove b43's workarounds at the same time. Other users of
ssb_dma_translation do not support any 64-bit DMA devices, so they are
not affected.
Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 78c1ee7e
......@@ -174,7 +174,7 @@ static void op64_fill_descriptor(struct b43_dmaring *ring,
addrhi = (((u64) dmaaddr >> 32) & ~SSB_DMA_TRANSLATION_MASK);
addrext = (((u64) dmaaddr >> 32) & SSB_DMA_TRANSLATION_MASK)
>> SSB_DMA_TRANSLATION_SHIFT;
addrhi |= (ring->dev->dma.translation << 1);
addrhi |= ring->dev->dma.translation;
if (slot == ring->nr_slots - 1)
ctl0 |= B43_DMA64_DCTL0_DTABLEEND;
if (start)
......@@ -678,7 +678,7 @@ static int dmacontroller_setup(struct b43_dmaring *ring)
b43_dma_write(ring, B43_DMA64_TXRINGHI,
((ringbase >> 32) &
~SSB_DMA_TRANSLATION_MASK)
| (trans << 1));
| trans);
} else {
u32 ringbase = (u32) (ring->dmabase);
......@@ -715,7 +715,7 @@ static int dmacontroller_setup(struct b43_dmaring *ring)
b43_dma_write(ring, B43_DMA64_RXRINGHI,
((ringbase >> 32) &
~SSB_DMA_TRANSLATION_MASK)
| (trans << 1));
| trans);
b43_dma_write(ring, B43_DMA64_RXINDEX, ring->nr_slots *
sizeof(struct b43_dmadesc64));
} else {
......
......@@ -1266,7 +1266,10 @@ u32 ssb_dma_translation(struct ssb_device *dev)
case SSB_BUSTYPE_SSB:
return 0;
case SSB_BUSTYPE_PCI:
return SSB_PCI_DMA;
if (ssb_read32(dev, SSB_TMSHIGH) & SSB_TMSHIGH_DMA64)
return SSB_PCIE_DMA_H32;
else
return SSB_PCI_DMA;
default:
__ssb_dma_not_implemented(dev);
}
......
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