diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-05-17 08:00:02 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-19 13:54:07 -0400 |
commit | 05100a29cb65b7473bc0c71282df3e31b460b728 (patch) | |
tree | 06e90af1e28dc453cc15221e017b4cf0a3cb7876 /drivers/net/wireless | |
parent | 0355a3452fe218b2bc61a7a571064ee86dd6bf4e (diff) |
b43: dma: cache translation (routing bits)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/b43/b43.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/b43/dma.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h index 02eca1833e9b..3c8200c62974 100644 --- a/drivers/net/wireless/b43/b43.h +++ b/drivers/net/wireless/b43/b43.h | |||
@@ -567,6 +567,8 @@ struct b43_dma { | |||
567 | struct b43_dmaring *tx_ring_mcast; /* Multicast */ | 567 | struct b43_dmaring *tx_ring_mcast; /* Multicast */ |
568 | 568 | ||
569 | struct b43_dmaring *rx_ring; | 569 | struct b43_dmaring *rx_ring; |
570 | |||
571 | u32 translation; /* Routing bits */ | ||
570 | }; | 572 | }; |
571 | 573 | ||
572 | struct b43_pio_txqueue; | 574 | struct b43_pio_txqueue; |
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index 10cfba3d7c46..47d44bcff37d 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c | |||
@@ -80,7 +80,7 @@ static void op32_fill_descriptor(struct b43_dmaring *ring, | |||
80 | addr = (u32) (dmaaddr & ~SSB_DMA_TRANSLATION_MASK); | 80 | addr = (u32) (dmaaddr & ~SSB_DMA_TRANSLATION_MASK); |
81 | addrext = (u32) (dmaaddr & SSB_DMA_TRANSLATION_MASK) | 81 | addrext = (u32) (dmaaddr & SSB_DMA_TRANSLATION_MASK) |
82 | >> SSB_DMA_TRANSLATION_SHIFT; | 82 | >> SSB_DMA_TRANSLATION_SHIFT; |
83 | addr |= ssb_dma_translation(ring->dev->sdev); | 83 | addr |= ring->dev->dma.translation; |
84 | ctl = bufsize & B43_DMA32_DCTL_BYTECNT; | 84 | ctl = bufsize & B43_DMA32_DCTL_BYTECNT; |
85 | if (slot == ring->nr_slots - 1) | 85 | if (slot == ring->nr_slots - 1) |
86 | ctl |= B43_DMA32_DCTL_DTABLEEND; | 86 | ctl |= B43_DMA32_DCTL_DTABLEEND; |
@@ -174,7 +174,7 @@ static void op64_fill_descriptor(struct b43_dmaring *ring, | |||
174 | addrhi = (((u64) dmaaddr >> 32) & ~SSB_DMA_TRANSLATION_MASK); | 174 | addrhi = (((u64) dmaaddr >> 32) & ~SSB_DMA_TRANSLATION_MASK); |
175 | addrext = (((u64) dmaaddr >> 32) & SSB_DMA_TRANSLATION_MASK) | 175 | addrext = (((u64) dmaaddr >> 32) & SSB_DMA_TRANSLATION_MASK) |
176 | >> SSB_DMA_TRANSLATION_SHIFT; | 176 | >> SSB_DMA_TRANSLATION_SHIFT; |
177 | addrhi |= (ssb_dma_translation(ring->dev->sdev) << 1); | 177 | addrhi |= (ring->dev->dma.translation << 1); |
178 | if (slot == ring->nr_slots - 1) | 178 | if (slot == ring->nr_slots - 1) |
179 | ctl0 |= B43_DMA64_DCTL0_DTABLEEND; | 179 | ctl0 |= B43_DMA64_DCTL0_DTABLEEND; |
180 | if (start) | 180 | if (start) |
@@ -658,7 +658,7 @@ static int dmacontroller_setup(struct b43_dmaring *ring) | |||
658 | int err = 0; | 658 | int err = 0; |
659 | u32 value; | 659 | u32 value; |
660 | u32 addrext; | 660 | u32 addrext; |
661 | u32 trans = ssb_dma_translation(ring->dev->sdev); | 661 | u32 trans = ring->dev->dma.translation; |
662 | 662 | ||
663 | if (ring->tx) { | 663 | if (ring->tx) { |
664 | if (ring->type == B43_DMA_64BIT) { | 664 | if (ring->type == B43_DMA_64BIT) { |
@@ -1055,6 +1055,7 @@ int b43_dma_init(struct b43_wldev *dev) | |||
1055 | err = b43_dma_set_mask(dev, dmamask); | 1055 | err = b43_dma_set_mask(dev, dmamask); |
1056 | if (err) | 1056 | if (err) |
1057 | return err; | 1057 | return err; |
1058 | dma->translation = ssb_dma_translation(dev->sdev); | ||
1058 | 1059 | ||
1059 | err = -ENOMEM; | 1060 | err = -ENOMEM; |
1060 | /* setup TX DMA channels. */ | 1061 | /* setup TX DMA channels. */ |