Thread (2 messages) flat view 2 messages, 2 authors, 2007-01-20
STALE7136d

[PATCH] # ppc: ppc4xx_set_src/dst_addr were only correct for DMA0

From: Niklaus Giger <hidden>
Date: 2007-01-19 23:02:37
Subsystem: the rest · Maintainer: Linus Torvalds

[PATCH] # ppc: ppc4xx_set_src/dst_addr were only correct for DMA0

The DCR-register numbers for DMA1-DMA3 were wrongly corrected.

Signed-off-by: Niklaus Giger <redacted>
---
 arch/ppc/syslib/ppc4xx_dma.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/ppc/syslib/ppc4xx_dma.c b/arch/ppc/syslib/ppc4xx_dma.c
index 1cb68a6..26b2ddf 100644
--- a/arch/ppc/syslib/ppc4xx_dma.c
+++ b/arch/ppc/syslib/ppc4xx_dma.c
@@ -47,9 +47,9 @@ ppc4xx_set_src_addr(int dmanr, phys_addr_t src_addr)
 	}
 
 #ifdef PPC4xx_DMA_64BIT
-	mtdcr(DCRN_DMASAH0 + dmanr*2, (u32)(src_addr >> 32));
+	mtdcr(DCRN_DMASAH0 + dmanr * 0x8, (u32)(src_addr >> 32));
 #else
-	mtdcr(DCRN_DMASA0 + dmanr*2, (u32)src_addr);
+	mtdcr(DCRN_DMASA0 + dmanr * 0x8, (u32)src_addr);
 #endif
 }
 
@@ -62,9 +62,9 @@ ppc4xx_set_dst_addr(int dmanr, phys_addr_t dst_addr)
 	}
 
 #ifdef PPC4xx_DMA_64BIT
-	mtdcr(DCRN_DMADAH0 + dmanr*2, (u32)(dst_addr >> 32));
+	mtdcr(DCRN_DMADAH0 + dmanr * 0x8, (u32)(dst_addr >> 32));
 #else
-	mtdcr(DCRN_DMADA0 + dmanr*2, (u32)dst_addr);
+	mtdcr(DCRN_DMADA0 + dmanr * 0x8, (u32)dst_addr);
 #endif
 }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help