diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2014-05-16 08:17:09 -0400 |
---|---|---|
committer | Sekhar Nori <nsekhar@ti.com> | 2014-05-22 01:17:46 -0400 |
commit | cf4afc3d2b6e11e507692c422eaf2b2e691e00d7 (patch) | |
tree | 7d7da57ea9f77be9c3465cd0292b83d6b70bb995 /arch/arm/common | |
parent | 89df4bed0f25157700c0ade5ac5f0296150eaecd (diff) |
ARM: edma: Take the number of tc from edma_soc_info (pdata)
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>
Diffstat (limited to 'arch/arm/common')
-rw-r--r-- | arch/arm/common/edma.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index fade9ada81f8..fde56e2ba203 100644 --- a/arch/arm/common/edma.c +++ b/arch/arm/common/edma.c | |||
@@ -1506,6 +1506,7 @@ static int edma_of_parse_dt(struct device *dev, | |||
1506 | pdata->n_slot = value; | 1506 | pdata->n_slot = value; |
1507 | 1507 | ||
1508 | pdata->n_cc = 1; | 1508 | pdata->n_cc = 1; |
1509 | pdata->n_tc = 3; | ||
1509 | 1510 | ||
1510 | rsv_info = devm_kzalloc(dev, sizeof(struct edma_rsv_info), GFP_KERNEL); | 1511 | rsv_info = devm_kzalloc(dev, sizeof(struct edma_rsv_info), GFP_KERNEL); |
1511 | if (!rsv_info) | 1512 | if (!rsv_info) |
@@ -1666,6 +1667,7 @@ static int edma_probe(struct platform_device *pdev) | |||
1666 | EDMA_MAX_PARAMENTRY); | 1667 | EDMA_MAX_PARAMENTRY); |
1667 | edma_cc[j]->num_cc = min_t(unsigned, info[j]->n_cc, | 1668 | edma_cc[j]->num_cc = min_t(unsigned, info[j]->n_cc, |
1668 | EDMA_MAX_CC); | 1669 | EDMA_MAX_CC); |
1670 | edma_cc[j]->num_tc = info[j]->n_tc; | ||
1669 | 1671 | ||
1670 | edma_cc[j]->default_queue = info[j]->default_queue; | 1672 | edma_cc[j]->default_queue = info[j]->default_queue; |
1671 | 1673 | ||
@@ -1759,9 +1761,6 @@ static int edma_probe(struct platform_device *pdev) | |||
1759 | map_queue_tc(j, queue_tc_mapping[i][0], | 1761 | map_queue_tc(j, queue_tc_mapping[i][0], |
1760 | queue_tc_mapping[i][1]); | 1762 | queue_tc_mapping[i][1]); |
1761 | 1763 | ||
1762 | /* Save the number of TCs */ | ||
1763 | edma_cc[j]->num_tc = i; | ||
1764 | |||
1765 | /* Event queue priority mapping */ | 1764 | /* Event queue priority mapping */ |
1766 | for (i = 0; queue_priority_mapping[i][0] != -1; i++) | 1765 | for (i = 0; queue_priority_mapping[i][0] != -1; i++) |
1767 | assign_priority_to_queue(j, | 1766 | assign_priority_to_queue(j, |