From: Viresh Kumar <viresh.kumar@st.com>
To: <dan.j.williams@intel.com>, <vinod.koul@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>, <vincenzo.frascino@st.com>,
<mirko.gardi@st.com>
Subject: [PATCH V1 Resend 2/3] dmaengine/dw_dmac: Set channel id's in controller driver
Date: Mon, 19 Dec 2011 10:00:59 +0530 [thread overview]
Message-ID: <f623b2b26a6236418a9fced145e2541b626809de.1324268691.git.viresh.kumar@st.com> (raw)
In-Reply-To: <cover.1324268691.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 9b592b0..35c8829 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1417,6 +1417,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++) {
@@ -1424,6 +1425,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.8.110.g4cb5d
next prev parent reply other threads:[~2011-12-19 4:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-19 4:30 [PATCH V1 Resend 0/3] dmaengine: Allow controller drivers to set channel ids Viresh Kumar
2011-12-19 4:30 ` [PATCH V1 Resend 1/3] " Viresh Kumar
2011-12-19 4:30 ` Viresh Kumar [this message]
2011-12-19 4:31 ` [PATCH V1 Resend 3/3] dmaengine/dw_dmac: Don't use magic number for total number of channels Viresh Kumar
2011-12-20 9:40 ` [PATCH V1 Resend 0/3] dmaengine: Allow controller drivers to set channel ids Williams, Dan J
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=f623b2b26a6236418a9fced145e2541b626809de.1324268691.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=mirko.gardi@st.com \
--cc=pratyush.anand@st.com \
--cc=rajeev-dlh.kumar@st.com \
--cc=shiraz.hashim@st.com \
--cc=vincenzo.frascino@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®