]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
dmaengine i.MX SDMA: set firmware scripts addresses to negative value initially
authorSascha Hauer <s.hauer@pengutronix.de>
Thu, 25 Aug 2011 09:03:36 +0000 (11:03 +0200)
committerVinod Koul <vinod.koul@intel.com>
Mon, 29 Aug 2011 14:38:37 +0000 (20:08 +0530)
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>
drivers/dma/imx-sdma.c

index f50c87c303dd5164fd115c0d94db9e2b6b7f49b1..8abf8c190aad2ab4c187332a4b790524275c197b 100644 (file)
@@ -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;