aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c24xx/dma.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-01-28 07:01:20 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-01-28 08:20:50 -0500
commitc6709e8ef5752314c22c75bc7575f9be390e215b (patch)
treeb263b43370faf705141dfee1bd2d8300c00fe2c5 /arch/arm/plat-s3c24xx/dma.c
parent67d729adc0e76e21c82a2c59853f25f5f784ca79 (diff)
[ARM] 4780/1: S3C2412: Allow for seperate DMA channels for TX and RX
The current S3C24XX DMA code does not allow for an peripheral that has one channel for RX and another for TX. This patch adds a per-cpu dma operation to select the transmit or receive channel, and adds support to the S3C2412 for the seperate DMA channels for TX and RX. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-s3c24xx/dma.c')
-rw-r--r--arch/arm/plat-s3c24xx/dma.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c
index aae1b9cbaf44..10ef3995b114 100644
--- a/arch/arm/plat-s3c24xx/dma.c
+++ b/arch/arm/plat-s3c24xx/dma.c
@@ -1184,7 +1184,7 @@ int s3c2410_dma_devconfig(int channel,
1184 dma_wrreg(chan, S3C2410_DMA_DIDSTC, (0<<1) | (0<<0)); 1184 dma_wrreg(chan, S3C2410_DMA_DIDSTC, (0<<1) | (0<<0));
1185 1185
1186 chan->addr_reg = dma_regaddr(chan, S3C2410_DMA_DIDST); 1186 chan->addr_reg = dma_regaddr(chan, S3C2410_DMA_DIDST);
1187 return 0; 1187 break;
1188 1188
1189 case S3C2410_DMASRC_MEM: 1189 case S3C2410_DMASRC_MEM:
1190 /* source is memory */ 1190 /* source is memory */
@@ -1195,11 +1195,19 @@ int s3c2410_dma_devconfig(int channel,
1195 dma_wrreg(chan, S3C2410_DMA_DIDSTC, hwcfg & 3); 1195 dma_wrreg(chan, S3C2410_DMA_DIDSTC, hwcfg & 3);
1196 1196
1197 chan->addr_reg = dma_regaddr(chan, S3C2410_DMA_DISRC); 1197 chan->addr_reg = dma_regaddr(chan, S3C2410_DMA_DISRC);
1198 return 0; 1198 break;
1199
1200 default:
1201 printk(KERN_ERR "dma%d: invalid source type (%d)\n",
1202 channel, source);
1203
1204 return -EINVAL;
1199 } 1205 }
1200 1206
1201 printk(KERN_ERR "dma%d: invalid source type (%d)\n", channel, source); 1207 if (dma_sel.direction != NULL)
1202 return -EINVAL; 1208 (dma_sel.direction)(chan, chan->map, source);
1209
1210 return 0;
1203} 1211}
1204 1212
1205EXPORT_SYMBOL(s3c2410_dma_devconfig); 1213EXPORT_SYMBOL(s3c2410_dma_devconfig);