diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2014-08-04 15:26:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-05 13:41:01 -0700 |
commit | f5c7b897bed163874913596cdb874e097d770a16 (patch) | |
tree | cf3232ac9aa34b20b9b5f984582db2e5cf7873c8 /arch | |
parent | 81e96655afdadfb73f54da071c6086752f1cf718 (diff) | |
download | lwn-f5c7b897bed163874913596cdb874e097d770a16.tar.gz lwn-f5c7b897bed163874913596cdb874e097d770a16.zip |
ARM: edma: Fix configuration parsing for SoCs with multiple eDMA3 CC
commit 929a015b1809a30748d487f9d25b16a41434b61a upstream.
The edma_setup_from_hw() should know about the CC number when parsing the
CCCFG register - when it reads the register to be precise. The base
addresses for CCs stored in an array and we need to provide the correct id
to edma_read() in order to read the correct register.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/common/edma.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index 485be42519b9..ea97e14e1f0b 100644 --- a/arch/arm/common/edma.c +++ b/arch/arm/common/edma.c @@ -1415,14 +1415,14 @@ void edma_clear_event(unsigned channel) EXPORT_SYMBOL(edma_clear_event); 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; u32 value, cccfg; s8 (*queue_priority_map)[2]; /* 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); edma_cc->num_region = BIT(value); @@ -1436,7 +1436,8 @@ static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata, value = GET_NUM_EVQUE(cccfg); 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_channel: %u\n", edma_cc->num_channels); dev_dbg(dev, "num_slot: %u\n", edma_cc->num_slots); @@ -1655,7 +1656,7 @@ static int edma_probe(struct platform_device *pdev) return -ENOMEM; /* 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) return ret; |