diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-08-25 11:03:36 +0200 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2011-08-29 20:08:37 +0530 |
commit | 36e2f21ab481b3d6bd31b99e1de669fbbac4bd0e (patch) | |
tree | 4e6c67bfa2a9dbb81e3a70760898c02f9d6e8cbe /drivers/dma/imx-sdma.c | |
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/imx-sdma.c')
-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 f50c87c303d..8abf8c190aa 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) struct sdma_platform_data *pdata = pdev->dev.platform_data; int i; struct sdma_engine *sdma; + s32 *saddr_arr; sdma = kzalloc(sizeof(*sdma), GFP_KERNEL); if (!sdma) @@ -1324,6 +1325,11 @@ static int __init sdma_probe(struct platform_device *pdev) goto err_alloc; } + /* initially no scripts available */ + saddr_arr = (s32 *)sdma->script_addrs; + for (i = 0; i < SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1; i++) + saddr_arr[i] = -EINVAL; + if (of_id) pdev->id_entry = of_id->data; sdma->devtype = pdev->id_entry->driver_data; |