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

Niklaus Giger niklaus.giger at member.fsf.org
Sat Jan 20 10:02:31 EST 2007


[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 <niklaus.giger at member.fsf.org>
---
 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
 }



More information about the Linuxppc-embedded mailing list