aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pxa27x.c
diff options
context:
space:
mode:
authorEric Miao <eric.y.miao@gmail.com>2007-06-22 00:40:17 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-07-12 09:28:16 -0400
commitf53f066c25036210036730d64c876ea586114425 (patch)
treee680deb53ff12ec09f5c64421a3f13eecb7aed41 /arch/arm/mach-pxa/pxa27x.c
parentcd49104d99b56383a3b1fdce2f31018197093c31 (diff)
[ARM] 4451/1: pxa: make dma.c generic and remove cpu specific dma code
Since the number of dma channels varies between pxa25x and pxa27x, it introduces some specific code in dma.c. This patch moves the specific code to pxa25x.c and pxa27x.c and makes dma.c more generic. 1. add pxa_init_dma() for dma initialization, the number of channels are passed in by the argument 2. add a "prio" field to the "struct pxa_dma_channel" for the channel priority, and is initialized in pxa_init_dma() 3. use a general priority comparison with the channels "prio" field so to remove the processor specific pxa_for_each_dma_prio macro, this is not lightning fast as the original one, but it is acceptable as it happens when requesting dma, which is usually not so performance critical Signed-off-by: eric miao <eric.miao@marvell.com> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/pxa27x.c')
-rw-r--r--arch/arm/mach-pxa/pxa27x.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index 1407985c8ab0..5b819e2c5563 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -23,6 +23,7 @@
23#include <asm/arch/pxa-regs.h> 23#include <asm/arch/pxa-regs.h>
24#include <asm/arch/ohci.h> 24#include <asm/arch/ohci.h>
25#include <asm/arch/pm.h> 25#include <asm/arch/pm.h>
26#include <asm/arch/dma.h>
26 27
27#include "generic.h" 28#include "generic.h"
28 29
@@ -214,6 +215,8 @@ static int __init pxa27x_init(void)
214{ 215{
215 int ret = 0; 216 int ret = 0;
216 if (cpu_is_pxa27x()) { 217 if (cpu_is_pxa27x()) {
218 if ((ret = pxa_init_dma(32)))
219 return ret;
217#ifdef CONFIG_PM 220#ifdef CONFIG_PM
218 pm_set_ops(&pxa27x_pm_ops); 221 pm_set_ops(&pxa27x_pm_ops);
219#endif 222#endif