ARM: OMAP: Split plat/cpu.h into local soc.h for mach-omap1 and mach-omap2
[deliverable/linux.git] / arch / arm / plat-omap / dma.c
index c76ed8bff8389c752f389ac0c26253ff39dc4802..49803cc18787fe3fbe0522ccf7a5031bbd5d160e 100644 (file)
 #include <linux/slab.h>
 #include <linux/delay.h>
 
-#include <plat/cpu.h>
-#include <plat/dma.h>
-#include <plat/tc.h>
+#include <plat-omap/dma-omap.h>
+
+#include "../mach-omap1/soc.h"
+#include "../mach-omap2/soc.h"
 
 /*
  * MAX_LOGICAL_DMA_CH_COUNT: the maximum number of logical DMA
@@ -175,6 +176,7 @@ static inline void set_gdma_dev(int req, int dev)
 #define omap_writel(val, reg)  do {} while (0)
 #endif
 
+#ifdef CONFIG_ARCH_OMAP1
 void omap_set_dma_priority(int lch, int dst_port, int priority)
 {
        unsigned long reg;
@@ -203,18 +205,22 @@ void omap_set_dma_priority(int lch, int dst_port, int priority)
                l |= (priority & 0xf) << 8;
                omap_writel(l, reg);
        }
+}
+#endif
 
-       if (cpu_class_is_omap2()) {
-               u32 ccr;
+#ifdef CONFIG_ARCH_OMAP2PLUS
+void omap_set_dma_priority(int lch, int dst_port, int priority)
+{
+       u32 ccr;
 
-               ccr = p->dma_read(CCR, lch);
-               if (priority)
-                       ccr |= (1 << 6);
-               else
-                       ccr &= ~(1 << 6);
-               p->dma_write(ccr, CCR, lch);
-       }
+       ccr = p->dma_read(CCR, lch);
+       if (priority)
+               ccr |= (1 << 6);
+       else
+               ccr &= ~(1 << 6);
+       p->dma_write(ccr, CCR, lch);
 }
+#endif
 EXPORT_SYMBOL(omap_set_dma_priority);
 
 void omap_set_dma_transfer_params(int lch, int data_type, int elem_count,
This page took 0.025742 seconds and 5 git commands to generate.