[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18c4b49c4949d7a5cb482187d1faa08178bbcb1e.1316687776.git.viresh.kumar@st.com>
Date: Thu, 22 Sep 2011 16:13:13 +0530
From: Viresh Kumar <viresh.kumar@...com>
To: <vinod.koul@...el.com>, <dan.j.williams@...el.com>
Cc: <linux-kernel@...r.kernel.org>, <armando.visconti@...com>,
<shiraz.hashim@...com>, <vipin.kumar@...com>,
<rajeev-dlh.kumar@...com>, <deepak.sikri@...com>,
<vipulkumar.samar@...com>, <amit.virdi@...com>,
<viresh.kumar@...com>, <pratyush.anand@...com>,
<bhupesh.sharma@...com>, <viresh.linux@...il.com>,
<bhavna.yadav@...com>
Subject: [PATCH 2/3] dmaengine/dw_dmac: Set channel id's in controller driver
dw_dmac may conditionally add channels in reverse order inside channel list in
struct dma_device. So, we must set chan_id's here and pass this to dmaengine, so
that it doesn't override these values.
Signed-off-by: Viresh Kumar <viresh.kumar@...com>
---
drivers/dma/dw_dmac.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 3550042..e2c8e4e 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1397,6 +1397,7 @@ static int __init dw_probe(struct platform_device *pdev)
tasklet_init(&dw->tasklet, dw_dma_tasklet, (unsigned long)dw);
dw->all_chan_mask = (1 << pdata->nr_channels) - 1;
+ dw->dma.chan_ids_set = true;
INIT_LIST_HEAD(&dw->dma.channels);
for (i = 0; i < pdata->nr_channels; i++) {
@@ -1404,6 +1405,7 @@ static int __init dw_probe(struct platform_device *pdev)
dwc->chan.device = &dw->dma;
dwc->chan.cookie = dwc->completed = 1;
+ dwc->chan.chan_id = i;
if (pdata->chan_allocation_order == CHAN_ALLOCATION_ASCENDING)
list_add_tail(&dwc->chan.device_node,
&dw->dma.channels);
--
1.7.2.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists