From: Viresh Kumar <viresh.kumar@st.com>
To: <vinod.koul@intel.com>, <dan.j.williams@intel.com>
Cc: <linux-kernel@vger.kernel.org>, <armando.visconti@st.com>,
<shiraz.hashim@st.com>, <vipin.kumar@st.com>,
<rajeev-dlh.kumar@st.com>, <deepak.sikri@st.com>,
<vipulkumar.samar@st.com>, <amit.virdi@st.com>,
<viresh.kumar@st.com>, <pratyush.anand@st.com>,
<bhupesh.sharma@st.com>, <viresh.linux@gmail.com>,
<bhavna.yadav@st.com>
Subject: [PATCH 2/3] dmaengine/dw_dmac: Set channel id's in controller driver
Date: Thu, 22 Sep 2011 16:13:13 +0530 [thread overview]
Message-ID: <18c4b49c4949d7a5cb482187d1faa08178bbcb1e.1316687776.git.viresh.kumar@st.com> (raw)
In-Reply-To: <63faf72913f4f35b0a542c859522e8333e878c95.1316687776.git.viresh.kumar@st.com>
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@st.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
next prev parent reply other threads:[~2011-09-22 10:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-22 10:43 [PATCH 1/3] dmaengine: Allow controller drivers to set channel ids Viresh Kumar
2011-09-22 10:43 ` Viresh Kumar [this message]
2011-09-22 10:43 ` [PATCH 3/3] dmaengine/dw_dmac: Don't use magic number for total number of channels Viresh Kumar
2011-09-28 9:08 ` [PATCH 1/3] dmaengine: Allow controller drivers to set channel ids Vinod Koul
2011-10-13 8:46 ` Viresh Kumar
2011-10-14 5:43 ` Vinod Koul
2011-10-31 10:22 ` Viresh Kumar
2011-11-16 11:41 ` Viresh Kumar
2011-11-28 4:05 ` Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18c4b49c4949d7a5cb482187d1faa08178bbcb1e.1316687776.git.viresh.kumar@st.com \
--to=viresh.kumar@st.com \
--cc=amit.virdi@st.com \
--cc=armando.visconti@st.com \
--cc=bhavna.yadav@st.com \
--cc=bhupesh.sharma@st.com \
--cc=dan.j.williams@intel.com \
--cc=deepak.sikri@st.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pratyush.anand@st.com \
--cc=rajeev-dlh.kumar@st.com \
--cc=shiraz.hashim@st.com \
--cc=vinod.koul@intel.com \
--cc=vipin.kumar@st.com \
--cc=vipulkumar.samar@st.com \
--cc=viresh.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®