[PATCH 4/6] Fixup tangox_dma_sbox_map
From: Marc Gonzalez
Date: Wed Nov 23 2016 - 12:02:02 EST
---
drivers/dma/tango-dma.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/dma/tango-dma.c b/drivers/dma/tango-dma.c
index 6a32d234ffb0..5250c053a7b9 100644
--- a/drivers/dma/tango-dma.c
+++ b/drivers/dma/tango-dma.c
@@ -108,11 +108,11 @@ static struct tangox_dma_desc *tangox_dma_alloc_desc(unsigned int num_sgs)
static void tangox_dma_sbox_map(struct tangox_dma_device *dev, int src, int dst)
{
- void __iomem *addr = dev->sbox_base + 8;
+ void __iomem *addr = dev->sbox_base + SBOX_ROUTE;
int shift = (dst - 1) * 4;
- if (shift > 31) {
- addr += 4;
+ if (dst > 8) {
+ addr = dev->sbox_base + SBOX_ROUTE2;
shift -= 32;
}
--
2.9.0