diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-08-25 05:03:36 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2011-08-29 10:38:37 -0400 |
commit | 36e2f21ab481b3d6bd31b99e1de669fbbac4bd0e (patch) | |
tree | 4e6c67bfa2a9dbb81e3a70760898c02f9d6e8cbe /drivers/dma | |
parent | 73eab978ad6934499b83ecc920d470fe99c5e54d (diff) |
dmaengine i.MX SDMA: set firmware scripts addresses to negative value initially
If we do not have a firmare script for a given transfer,
the setup of this channel must fail. For this the script
addresses have to be < 0 initially, not 0.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/imx-sdma.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index f50c87c303dd..8abf8c190aad 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c | |||
@@ -1281,6 +1281,7 @@ static int __init sdma_probe(struct platform_device *pdev) | |||
1281 | struct sdma_platform_data *pdata = pdev->dev.platform_data; | 1281 | struct sdma_platform_data *pdata = pdev->dev.platform_data; |
1282 | int i; | 1282 | int i; |
1283 | struct sdma_engine *sdma; | 1283 | struct sdma_engine *sdma; |
1284 | s32 *saddr_arr; | ||
1284 | 1285 | ||
1285 | sdma = kzalloc(sizeof(*sdma), GFP_KERNEL); | 1286 | sdma = kzalloc(sizeof(*sdma), GFP_KERNEL); |
1286 | if (!sdma) | 1287 | if (!sdma) |
@@ -1324,6 +1325,11 @@ static int __init sdma_probe(struct platform_device *pdev) | |||
1324 | goto err_alloc; | 1325 | goto err_alloc; |
1325 | } | 1326 | } |
1326 | 1327 | ||
1328 | /* initially no scripts available */ | ||
1329 | saddr_arr = (s32 *)sdma->script_addrs; | ||
1330 | for (i = 0; i < SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1; i++) | ||
1331 | saddr_arr[i] = -EINVAL; | ||
1332 | |||
1327 | if (of_id) | 1333 | if (of_id) |
1328 | pdev->id_entry = of_id->data; | 1334 | pdev->id_entry = of_id->data; |
1329 | sdma->devtype = pdev->id_entry->driver_data; | 1335 | sdma->devtype = pdev->id_entry->driver_data; |