dmaengine: ti: edma: Do not reset reserved paRAM slots
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Fri, 23 Aug 2019 12:56:14 +0000 (15:56 +0300)
committerVinod Koul <vkoul@kernel.org>
Wed, 4 Sep 2019 09:49:19 +0000 (15:19 +0530)
Skip resetting paRAM slots marked as reserved as they might be used by
other cores.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20190823125618.8133-2-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/ti/edma.c

index 54895112ba59f7a66e6dcff57387ce695e9a3390..1aae95cc0d4b0382e9b8a0809bb4a74bc48f47a2 100644 (file)
@@ -2338,9 +2338,6 @@ static int edma_probe(struct platform_device *pdev)
 
        ecc->default_queue = info->default_queue;
 
-       for (i = 0; i < ecc->num_slots; i++)
-               edma_write_slot(ecc, i, &dummy_paramset);
-
        if (info->rsv) {
                /* Set the reserved slots in inuse list */
                rsv_slots = info->rsv->rsv_slots;
@@ -2353,6 +2350,12 @@ static int edma_probe(struct platform_device *pdev)
                }
        }
 
+       for (i = 0; i < ecc->num_slots; i++) {
+               /* Reset only unused - not reserved - paRAM slots */
+               if (!test_bit(i, ecc->slot_inuse))
+                       edma_write_slot(ecc, i, &dummy_paramset);
+       }
+
        /* Clear the xbar mapped channels in unused list */
        xbar_chans = info->xbar_chans;
        if (xbar_chans) {