aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeng Zhaoming <b32542@freescale.com>2011-08-09 02:27:05 +0800
committerEric Miao <eric.miao@linaro.org>2012-01-11 21:53:24 +0800
commiteefd5d2c7e1a8853ca5427689b82fc196caca2b0 (patch)
treebed71917d002fc0742895dd6b9f32911a20497c9
parent2d4cb8a196efc0277920988e305b3c5a8bb0b897 (diff)
downloadlinux-linaro-eefd5d2c7e1a8853ca5427689b82fc196caca2b0.tar.gz
ENGR00154525 SDMA: SDMA not works when event number bigger than 32
New sdma driver in 2.6.38 kernel not map event to channel correctly by ignore events bigger than 32. Fix it by remove this restriction Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
-rw-r--r--drivers/dma/imx-sdma.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index c3d135afe66..3d3e75aeeab 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -713,11 +713,11 @@ static int sdma_config_channel(struct sdma_channel *sdmac)
sdmac->shp_addr = 0;
sdmac->per_addr = 0;
- if (sdmac->event_id0) {
- if (sdmac->event_id0 > 32)
- return -EINVAL;
+ if (sdmac->event_id0)
sdma_event_enable(sdmac, sdmac->event_id0);
- }
+
+ if (sdmac->event_id1)
+ sdma_event_enable(sdmac, sdmac->event_id1);
switch (sdmac->peripheral_type) {
case IMX_DMATYPE_DSP:
@@ -739,10 +739,10 @@ static int sdma_config_channel(struct sdma_channel *sdmac)
if (sdmac->event_id1) {
sdmac->event_mask1 = 1 << (sdmac->event_id1 % 32);
if (sdmac->event_id1 > 31)
- sdmac->watermark_level |= 1 << 31;
+ sdmac->watermark_level |= 1 << 29;
sdmac->event_mask0 = 1 << (sdmac->event_id0 % 32);
if (sdmac->event_id0 > 31)
- sdmac->watermark_level |= 1 << 30;
+ sdmac->watermark_level |= 1 << 28;
} else {
sdmac->event_mask0 = 1 << sdmac->event_id0;
sdmac->event_mask1 = 1 << (sdmac->event_id0 - 32);