aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common/edma.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/common/edma.c')
-rw-r--r--arch/arm/common/edma.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
index 88099175fc56..d86771abbf57 100644
--- a/arch/arm/common/edma.c
+++ b/arch/arm/common/edma.c
@@ -1443,14 +1443,14 @@ void edma_assign_channel_eventq(unsigned channel, enum dma_event_q eventq_no)
1443EXPORT_SYMBOL(edma_assign_channel_eventq); 1443EXPORT_SYMBOL(edma_assign_channel_eventq);
1444 1444
1445static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata, 1445static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata,
1446 struct edma *edma_cc) 1446 struct edma *edma_cc, int cc_id)
1447{ 1447{
1448 int i; 1448 int i;
1449 u32 value, cccfg; 1449 u32 value, cccfg;
1450 s8 (*queue_priority_map)[2]; 1450 s8 (*queue_priority_map)[2];
1451 1451
1452 /* Decode the eDMA3 configuration from CCCFG register */ 1452 /* Decode the eDMA3 configuration from CCCFG register */
1453 cccfg = edma_read(0, EDMA_CCCFG); 1453 cccfg = edma_read(cc_id, EDMA_CCCFG);
1454 1454
1455 value = GET_NUM_REGN(cccfg); 1455 value = GET_NUM_REGN(cccfg);
1456 edma_cc->num_region = BIT(value); 1456 edma_cc->num_region = BIT(value);
@@ -1464,7 +1464,8 @@ static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata,
1464 value = GET_NUM_EVQUE(cccfg); 1464 value = GET_NUM_EVQUE(cccfg);
1465 edma_cc->num_tc = value + 1; 1465 edma_cc->num_tc = value + 1;
1466 1466
1467 dev_dbg(dev, "eDMA3 HW configuration (cccfg: 0x%08x):\n", cccfg); 1467 dev_dbg(dev, "eDMA3 CC%d HW configuration (cccfg: 0x%08x):\n", cc_id,
1468 cccfg);
1468 dev_dbg(dev, "num_region: %u\n", edma_cc->num_region); 1469 dev_dbg(dev, "num_region: %u\n", edma_cc->num_region);
1469 dev_dbg(dev, "num_channel: %u\n", edma_cc->num_channels); 1470 dev_dbg(dev, "num_channel: %u\n", edma_cc->num_channels);
1470 dev_dbg(dev, "num_slot: %u\n", edma_cc->num_slots); 1471 dev_dbg(dev, "num_slot: %u\n", edma_cc->num_slots);
@@ -1684,7 +1685,7 @@ static int edma_probe(struct platform_device *pdev)
1684 return -ENOMEM; 1685 return -ENOMEM;
1685 1686
1686 /* Get eDMA3 configuration from IP */ 1687 /* Get eDMA3 configuration from IP */
1687 ret = edma_setup_from_hw(dev, info[j], edma_cc[j]); 1688 ret = edma_setup_from_hw(dev, info[j], edma_cc[j], j);
1688 if (ret) 1689 if (ret)
1689 return ret; 1690 return ret;
1690 1691