aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@bitmer.com>2013-06-15 04:31:07 -0400
committerTony Lindgren <tony@atomide.com>2013-06-18 03:12:34 -0400
commitbf2920aa57f339b3901172ca35fbbf303acf8e16 (patch)
tree11236740287c6f8e8aa3759c1d40422a378d9260
parentc821c4628a50da66ff9885bf7cd3df965a8464a1 (diff)
ARM: OMAP1: Remove duplicated DMA channel definitions
Similarly than with OMAP2 there are many DMA channel definitions that have been moved or redefined in drivers using them and we can remove them from dma.h. There is exception with MMC that arch/arm/mach-omap1/devices.c is using MMC DMA channel definitions for setting platform data but those can be well replaced with numeric values. Remove dma.h include from arch/arm/mach-omap1/devices.c and use a script below for dropping duplicated definitions and for replacing definitions with DMA channel numbers. grep '#define OMAP_DMA' arch/arm/mach-omap1/dma.h | while read -r i; do \ DDEF=`echo $i |cut -d ' ' -f 1-2`; \ DEF=`echo $DDEF |cut -d ' ' -f 2`; \ CH=`echo $i |cut -d ' ' -f 3`; \ if [ `git grep -c "$DDEF" |wc -l` -gt 1 ]; then \ echo "removing" $DEF; \ sed -i "s/${DEF}/${CH}/" arch/arm/mach-omap1/devices.c; \ sed -i "/${DDEF}/d" arch/arm/mach-omap1/dma.h; \ fi; \ done Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap1/devices.c9
-rw-r--r--arch/arm/mach-omap1/dma.h8
2 files changed, 4 insertions, 13 deletions
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 0af635205e8a..325e6030095e 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -30,7 +30,6 @@
30 30
31#include "common.h" 31#include "common.h"
32#include "clock.h" 32#include "clock.h"
33#include "dma.h"
34#include "mmc.h" 33#include "mmc.h"
35#include "sram.h" 34#include "sram.h"
36 35
@@ -223,16 +222,16 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
223 case 0: 222 case 0:
224 base = OMAP1_MMC1_BASE; 223 base = OMAP1_MMC1_BASE;
225 irq = INT_MMC; 224 irq = INT_MMC;
226 rx_req = OMAP_DMA_MMC_RX; 225 rx_req = 22;
227 tx_req = OMAP_DMA_MMC_TX; 226 tx_req = 21;
228 break; 227 break;
229 case 1: 228 case 1:
230 if (!cpu_is_omap16xx()) 229 if (!cpu_is_omap16xx())
231 return; 230 return;
232 base = OMAP1_MMC2_BASE; 231 base = OMAP1_MMC2_BASE;
233 irq = INT_1610_MMC2; 232 irq = INT_1610_MMC2;
234 rx_req = OMAP_DMA_MMC2_RX; 233 rx_req = 55;
235 tx_req = OMAP_DMA_MMC2_TX; 234 tx_req = 54;
236 break; 235 break;
237 default: 236 default:
238 continue; 237 continue;
diff --git a/arch/arm/mach-omap1/dma.h b/arch/arm/mach-omap1/dma.h
index 1932e9a72139..dc33cd98202b 100644
--- a/arch/arm/mach-omap1/dma.h
+++ b/arch/arm/mach-omap1/dma.h
@@ -20,17 +20,9 @@
20#define __OMAP1_DMA_CHANNEL_H 20#define __OMAP1_DMA_CHANNEL_H
21 21
22/* DMA channels for omap1 */ 22/* DMA channels for omap1 */
23#define OMAP_DMA_NO_DEVICE 0
24#define OMAP_DMA_UART3_TX 18 23#define OMAP_DMA_UART3_TX 18
25#define OMAP_DMA_UART3_RX 19 24#define OMAP_DMA_UART3_RX 19
26#define OMAP_DMA_CAMERA_IF_RX 20
27#define OMAP_DMA_MMC_TX 21
28#define OMAP_DMA_MMC_RX 22
29#define OMAP_DMA_USB_W2FC_RX0 26
30#define OMAP_DMA_USB_W2FC_TX0 29
31 25
32/* These are only for 1610 */ 26/* These are only for 1610 */
33#define OMAP_DMA_MMC2_TX 54
34#define OMAP_DMA_MMC2_RX 55
35 27
36#endif /* __OMAP1_DMA_CHANNEL_H */ 28#endif /* __OMAP1_DMA_CHANNEL_H */