ARM: OMAP1: Remove McBSP DMA channel definitions
authorJarkko Nikula <jarkko.nikula@bitmer.com>
Sat, 15 Jun 2013 08:31:06 +0000 (11:31 +0300)
committerTony Lindgren <tony@atomide.com>
Tue, 18 Jun 2013 07:12:34 +0000 (00:12 -0700)
arch/arm/mach-omap1/mcbsp.c is only place where OMAP1 McBSP DMA channel
definitions are set. We may well use numerical values there and get rid
of their definitions in arch/arm/mach-omap1/dma.h.

Remove dma.h include from arch/arm/mach-omap1/mcbsp.c and use following
script for replacing definitions with DMA channel number:

egrep '#define OMAP_DMA_MCBSP' arch/arm/mach-omap1/dma.h | cut -f 1,3 \
| while read i; do \
DEF=`echo $i |cut -d ' ' -f 2`; \
CH=`echo $i |cut -d ' ' -f 3`; \
echo "removing" $DEF; \
sed -i "s/${DEF}/${CH}/" arch/arm/mach-omap1/mcbsp.c; \
sed -i "/${DEF}/d" arch/arm/mach-omap1/dma.h; \
done

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/dma.h
arch/arm/mach-omap1/mcbsp.c

index d05909c967152223c0a6390c886c74c60ede3e61..1932e9a72139b2d6065ba4e4ef4729fdbf0e139f 100644 (file)
 
 /* DMA channels for omap1 */
 #define OMAP_DMA_NO_DEVICE             0
-#define OMAP_DMA_MCBSP1_TX             8
-#define OMAP_DMA_MCBSP1_RX             9
-#define OMAP_DMA_MCBSP3_TX             10
-#define OMAP_DMA_MCBSP3_RX             11
-#define OMAP_DMA_MCBSP2_TX             16
-#define OMAP_DMA_MCBSP2_RX             17
 #define OMAP_DMA_UART3_TX              18
 #define OMAP_DMA_UART3_RX              19
 #define OMAP_DMA_CAMERA_IF_RX          20
index b0d4723c9a90718ccbef119dfdf95412b33c4109..8ed67f8d1762f3bc5937e46c0519b816d135cddf 100644 (file)
@@ -27,7 +27,6 @@
 #include <mach/irqs.h>
 
 #include "iomap.h"
-#include "dma.h"
 
 #define DPS_RSTCT2_PER_EN      (1 << 0)
 #define DSP_RSTCT2_WD_PER_EN   (1 << 1)
@@ -114,12 +113,12 @@ struct resource omap7xx_mcbsp_res[][6] = {
                },
                {
                        .name  = "rx",
-                       .start = OMAP_DMA_MCBSP1_RX,
+                       .start = 9,
                        .flags = IORESOURCE_DMA,
                },
                {
                        .name  = "tx",
-                       .start = OMAP_DMA_MCBSP1_TX,
+                       .start = 8,
                        .flags = IORESOURCE_DMA,
                },
        },
@@ -141,12 +140,12 @@ struct resource omap7xx_mcbsp_res[][6] = {
                },
                {
                        .name  = "rx",
-                       .start = OMAP_DMA_MCBSP3_RX,
+                       .start = 11,
                        .flags = IORESOURCE_DMA,
                },
                {
                        .name  = "tx",
-                       .start = OMAP_DMA_MCBSP3_TX,
+                       .start = 10,
                        .flags = IORESOURCE_DMA,
                },
        },
@@ -191,12 +190,12 @@ struct resource omap15xx_mcbsp_res[][6] = {
                },
                {
                        .name  = "rx",
-                       .start = OMAP_DMA_MCBSP1_RX,
+                       .start = 9,
                        .flags = IORESOURCE_DMA,
                },
                {
                        .name  = "tx",
-                       .start = OMAP_DMA_MCBSP1_TX,
+                       .start = 8,
                        .flags = IORESOURCE_DMA,
                },
        },
@@ -218,12 +217,12 @@ struct resource omap15xx_mcbsp_res[][6] = {
                },
                {
                        .name  = "rx",
-                       .start = OMAP_DMA_MCBSP2_RX,
+                       .start = 17,
                        .flags = IORESOURCE_DMA,
                },
                {
                        .name  = "tx",
-                       .start = OMAP_DMA_MCBSP2_TX,
+                       .start = 16,
                        .flags = IORESOURCE_DMA,
                },
        },
@@ -245,12 +244,12 @@ struct resource omap15xx_mcbsp_res[][6] = {
                },
                {
                        .name  = "rx",
-                       .start = OMAP_DMA_MCBSP3_RX,
+                       .start = 11,
                        .flags = IORESOURCE_DMA,
                },
                {
                        .name  = "tx",
-                       .start = OMAP_DMA_MCBSP3_TX,
+                       .start = 10,
                        .flags = IORESOURCE_DMA,
                },
        },
@@ -298,12 +297,12 @@ struct resource omap16xx_mcbsp_res[][6] = {
                },
                {
                        .name  = "rx",
-                       .start = OMAP_DMA_MCBSP1_RX,
+                       .start = 9,
                        .flags = IORESOURCE_DMA,
                },
                {
                        .name  = "tx",
-                       .start = OMAP_DMA_MCBSP1_TX,
+                       .start = 8,
                        .flags = IORESOURCE_DMA,
                },
        },
@@ -325,12 +324,12 @@ struct resource omap16xx_mcbsp_res[][6] = {
                },
                {
                        .name  = "rx",
-                       .start = OMAP_DMA_MCBSP2_RX,
+                       .start = 17,
                        .flags = IORESOURCE_DMA,
                },
                {
                        .name  = "tx",
-                       .start = OMAP_DMA_MCBSP2_TX,
+                       .start = 16,
                        .flags = IORESOURCE_DMA,
                },
        },
@@ -352,12 +351,12 @@ struct resource omap16xx_mcbsp_res[][6] = {
                },
                {
                        .name  = "rx",
-                       .start = OMAP_DMA_MCBSP3_RX,
+                       .start = 11,
                        .flags = IORESOURCE_DMA,
                },
                {
                        .name  = "tx",
-                       .start = OMAP_DMA_MCBSP3_TX,
+                       .start = 10,
                        .flags = IORESOURCE_DMA,
                },
        },