]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: edma: Take the number of tc from edma_soc_info (pdata)
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Fri, 16 May 2014 12:17:09 +0000 (15:17 +0300)
committerSekhar Nori <nsekhar@ti.com>
Thu, 22 May 2014 05:17:46 +0000 (10:47 +0530)
Instead of saving the for loop length, take the num_tc value from the pdata.
In case of DT boot set the n_tc to 3 as it is hardwired in edma_of_parse_dt()
This is a temporary state since upcoming patch(es) will change how we are
dealing with these parameters.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arch/arm/common/edma.c

index fade9ada81f8b2aa53ea067862ac1ebd6baed489..fde56e2ba2031be4a9af1861f6f88beefd4e1fb3 100644 (file)
@@ -1506,6 +1506,7 @@ static int edma_of_parse_dt(struct device *dev,
        pdata->n_slot = value;
 
        pdata->n_cc = 1;
+       pdata->n_tc = 3;
 
        rsv_info = devm_kzalloc(dev, sizeof(struct edma_rsv_info), GFP_KERNEL);
        if (!rsv_info)
@@ -1666,6 +1667,7 @@ static int edma_probe(struct platform_device *pdev)
                                                        EDMA_MAX_PARAMENTRY);
                edma_cc[j]->num_cc = min_t(unsigned, info[j]->n_cc,
                                                        EDMA_MAX_CC);
+               edma_cc[j]->num_tc = info[j]->n_tc;
 
                edma_cc[j]->default_queue = info[j]->default_queue;
 
@@ -1759,9 +1761,6 @@ static int edma_probe(struct platform_device *pdev)
                        map_queue_tc(j, queue_tc_mapping[i][0],
                                        queue_tc_mapping[i][1]);
 
-               /* Save the number of TCs */
-               edma_cc[j]->num_tc = i;
-
                /* Event queue priority mapping */
                for (i = 0; queue_priority_mapping[i][0] != -1; i++)
                        assign_priority_to_queue(j,