diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-07-06 11:18:33 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-07-07 09:55:50 +0200 |
commit | 6584cb8825e4c74915a5a13756b1902523391d78 (patch) | |
tree | e1abfedf3480f98df93fd22586344a9668a9afe5 /drivers | |
parent | 9d73242458d9a2fe26e2e240488063d414eacb1c (diff) | |
download | op-kernel-dev-6584cb8825e4c74915a5a13756b1902523391d78.zip op-kernel-dev-6584cb8825e4c74915a5a13756b1902523391d78.tar.gz |
ARM i.MX dma: Fix burstsize settings
dmaengine expects the maxburst parameter in words, not bytes.
The imxdma driver and its users do this wrong. Fix this.
As a side note the imx-pcm-dma-mx2 driver was 'fixed' to work
with imx-dma. This broke the driver with imx-sdma support which
correctly takes the maxburst parameter in words. This patch
puts the sdma based sound back to work.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/imx-dma.c | 3 | ||||
-rw-r--r-- | drivers/mmc/host/mxcmmc.c | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index e18eaab..d99f71c 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c @@ -135,7 +135,8 @@ static int imxdma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, if (ret) return ret; - imx_dma_config_burstlen(imxdmac->imxdma_channel, imxdmac->watermark_level); + imx_dma_config_burstlen(imxdmac->imxdma_channel, + imxdmac->watermark_level * imxdmac->word_size); return 0; default: diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index cc20e02..14aa213 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c @@ -715,13 +715,13 @@ static void mxcmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) int burstlen, ret; /* - * use burstlen of 64 in 4 bit mode (--> reg value 0) - * use burstlen of 16 in 1 bit mode (--> reg value 16) + * use burstlen of 64 (16 words) in 4 bit mode (--> reg value 0) + * use burstlen of 16 (4 words) in 1 bit mode (--> reg value 16) */ if (ios->bus_width == MMC_BUS_WIDTH_4) - burstlen = 64; - else burstlen = 16; + else + burstlen = 4; if (mxcmci_use_dma(host) && burstlen != host->burstlen) { host->burstlen = burstlen; |