[PATCH 7/9] m68knommu: modify ColdFire dma_timer to use common definitions

gerg
2014-05-28T00:49:57Z

The ColdFire DMA Timer hardware module is used on a number of the ColdFire
family System on Chips. Modify the dma_timer.c driver address definitions
so that it can be used on any of those devices.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/m68k/platform/coldfire/dma_timer.c | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/arch/m68k/platform/coldfire/dma_timer.c b/arch/m68k/platform/coldfire/dma_timer.c
index 235ad57..9b7b950 100644
--- a/arch/m68k/platform/coldfire/dma_timer.c
+++ b/arch/m68k/platform/coldfire/dma_timer.c
@@ -14,17 +14,12 @@
#include <asm/mcfpit.h>
#include <asm/mcfsim.h>

-#define DMA_TIMER_0 (0x00)
-#define DMA_TIMER_1 (0x40)
-#define DMA_TIMER_2 (0x80)
-#define DMA_TIMER_3 (0xc0)
-
-#define DTMR0 (MCF_IPSBAR + DMA_TIMER_0 + 0x400)
-#define DTXMR0 (MCF_IPSBAR + DMA_TIMER_0 + 0x402)
-#define DTER0 (MCF_IPSBAR + DMA_TIMER_0 + 0x403)
-#define DTRR0 (MCF_IPSBAR + DMA_TIMER_0 + 0x404)
-#define DTCR0 (MCF_IPSBAR + DMA_TIMER_0 + 0x408)
-#define DTCN0 (MCF_IPSBAR + DMA_TIMER_0 + 0x40c)
+#define DTMR0 (MCFDTIM_BASE0 + 0x0)
+#define DTXMR0 (MCFDTIM_BASE0 + 0x2)
+#define DTER0 (MCFDTIM_BASE0 + 0x3)
+#define DTRR0 (MCFDTIM_BASE0 + 0x4)
+#define DTCR0 (MCFDTIM_BASE0 + 0x8)
+#define DTCN0 (MCFDTIM_BASE0 + 0xc)

#define DMA_FREQ ((MCF_CLK / 2) / 16)

--
1.8.1.4