summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c64xx/dma.c
diff options
context:
space:
mode:
authorJassi Brar <jassi.brar@samsung.com>2009-11-05 13:44:45 +0900
committerBen Dooks <ben-linux@fluff.org>2009-11-09 23:50:42 +0000
commit7507f39c57d4a285aea11c379fbc65c2b3f375ef (patch)
treebbc206d771b2f43f9cabe5f9bfd8dc47d8b6eb46 /arch/arm/plat-s3c64xx/dma.c
parent6d0b8627d545aed7d4bcaad2156b6cb95e105715 (diff)
downloadlinux-7507f39c57d4a285aea11c379fbc65c2b3f375ef.tar.bz2
ARM: S3C64XX: DMA: Make src and dst transfer size same
Some devices don't seem to work if the source and desitnation transfer widths are not same. For example, SPI dma xfers, with 8bits/word, don't work without this patch. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c64xx/dma.c')
-rw-r--r--arch/arm/plat-s3c64xx/dma.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/plat-s3c64xx/dma.c b/arch/arm/plat-s3c64xx/dma.c
index 5a08a86419dd..a94281bb84d6 100644
--- a/arch/arm/plat-s3c64xx/dma.c
+++ b/arch/arm/plat-s3c64xx/dma.c
@@ -151,8 +151,6 @@ static void s3c64xx_dma_fill_lli(struct s3c2410_dma_chan *chan,
src = chan->dev_addr;
dst = data;
control0 = PL080_CONTROL_SRC_AHB2;
- control0 |= (u32)chan->hw_width << PL080_CONTROL_SWIDTH_SHIFT;
- control0 |= 2 << PL080_CONTROL_DWIDTH_SHIFT;
control0 |= PL080_CONTROL_DST_INCR;
break;
@@ -160,8 +158,6 @@ static void s3c64xx_dma_fill_lli(struct s3c2410_dma_chan *chan,
src = data;
dst = chan->dev_addr;
control0 = PL080_CONTROL_DST_AHB2;
- control0 |= (u32)chan->hw_width << PL080_CONTROL_DWIDTH_SHIFT;
- control0 |= 2 << PL080_CONTROL_SWIDTH_SHIFT;
control0 |= PL080_CONTROL_SRC_INCR;
break;
default:
@@ -173,6 +169,8 @@ static void s3c64xx_dma_fill_lli(struct s3c2410_dma_chan *chan,
control1 = size >> chan->hw_width; /* size in no of xfers */
control0 |= PL080_CONTROL_PROT_SYS; /* always in priv. mode */
control0 |= PL080_CONTROL_TC_IRQ_EN; /* always fire IRQ */
+ control0 |= (u32)chan->hw_width << PL080_CONTROL_DWIDTH_SHIFT;
+ control0 |= (u32)chan->hw_width << PL080_CONTROL_SWIDTH_SHIFT;
lli->src_addr = src;
lli->dst_addr = dst;