Commit 28c2260f authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'davinci-fixes-for-v3.17-rc4' of...

Merge tag 'davinci-fixes-for-v3.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes

This patch fixes setup of second EDMA channel controller
on DA850.

* tag 'davinci-fixes-for-v3.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci:
  ARM: edma: Fix configuration parsing for SoCs with multiple eDMA3 CC
parents dbd366fd 929a015b
...@@ -1443,14 +1443,14 @@ void edma_assign_channel_eventq(unsigned channel, enum dma_event_q eventq_no) ...@@ -1443,14 +1443,14 @@ void edma_assign_channel_eventq(unsigned channel, enum dma_event_q eventq_no)
EXPORT_SYMBOL(edma_assign_channel_eventq); EXPORT_SYMBOL(edma_assign_channel_eventq);
static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata, static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata,
struct edma *edma_cc) struct edma *edma_cc, int cc_id)
{ {
int i; int i;
u32 value, cccfg; u32 value, cccfg;
s8 (*queue_priority_map)[2]; s8 (*queue_priority_map)[2];
/* Decode the eDMA3 configuration from CCCFG register */ /* Decode the eDMA3 configuration from CCCFG register */
cccfg = edma_read(0, EDMA_CCCFG); cccfg = edma_read(cc_id, EDMA_CCCFG);
value = GET_NUM_REGN(cccfg); value = GET_NUM_REGN(cccfg);
edma_cc->num_region = BIT(value); 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,7 +1464,8 @@ static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata,
value = GET_NUM_EVQUE(cccfg); value = GET_NUM_EVQUE(cccfg);
edma_cc->num_tc = value + 1; edma_cc->num_tc = value + 1;
dev_dbg(dev, "eDMA3 HW configuration (cccfg: 0x%08x):\n", cccfg); dev_dbg(dev, "eDMA3 CC%d HW configuration (cccfg: 0x%08x):\n", cc_id,
cccfg);
dev_dbg(dev, "num_region: %u\n", edma_cc->num_region); dev_dbg(dev, "num_region: %u\n", edma_cc->num_region);
dev_dbg(dev, "num_channel: %u\n", edma_cc->num_channels); dev_dbg(dev, "num_channel: %u\n", edma_cc->num_channels);
dev_dbg(dev, "num_slot: %u\n", edma_cc->num_slots); dev_dbg(dev, "num_slot: %u\n", edma_cc->num_slots);
...@@ -1684,7 +1685,7 @@ static int edma_probe(struct platform_device *pdev) ...@@ -1684,7 +1685,7 @@ static int edma_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
/* Get eDMA3 configuration from IP */ /* Get eDMA3 configuration from IP */
ret = edma_setup_from_hw(dev, info[j], edma_cc[j]); ret = edma_setup_from_hw(dev, info[j], edma_cc[j], j);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment