From: viresh.kumar@st.com (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 08/13] dw_dmac: Pass Channel Allocation Order from platform_data
Date: Thu, 3 Mar 2011 15:47:21 +0530 [thread overview]
Message-ID: <ae9ffb45b87e19aabeba9321ffffb8ec2b5f5056.1299146382.git.viresh.kumar@st.com> (raw)
In-Reply-To: <cover.1299146382.git.viresh.kumar@st.com>
In SPEAr Platform channels 4-7 have more Fifo depth. So we must get better
channel first. This patch introduces concept of channel allocation order in
dw_dmac. If user doesn't pass anything or 0, than normal (ascending) channel
allocation will follow, else channels will be allocated in descending order.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
drivers/dma/dw_dmac.c | 6 +++++-
include/linux/dw_dmac.h | 3 +++
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 836c299..076a2fa 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1319,7 +1319,11 @@ 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;
- list_add_tail(&dwc->chan.device_node, &dw->dma.channels);
+ if (pdata->chan_allocation_order == CHAN_ALLOCATION_ASCENDING)
+ list_add_tail(&dwc->chan.device_node,
+ &dw->dma.channels);
+ else
+ list_add(&dwc->chan.device_node, &dw->dma.channels);
dwc->ch_regs = &__dw_regs(dw)->CHAN[i];
spin_lock_init(&dwc->lock);
diff --git a/include/linux/dw_dmac.h b/include/linux/dw_dmac.h
index deec66b..a18c498 100644
--- a/include/linux/dw_dmac.h
+++ b/include/linux/dw_dmac.h
@@ -22,6 +22,9 @@
struct dw_dma_platform_data {
unsigned int nr_channels;
bool is_private;
+#define CHAN_ALLOCATION_ASCENDING 0 /* zero to seven */
+#define CHAN_ALLOCATION_DESCENDING 1 /* seven to zero */
+ unsigned char chan_allocation_order;
};
/**
--
1.7.2.2
next prev parent reply other threads:[~2011-03-03 10:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-03 10:17 [PATCH V2 00/13] dmaengine/dw_dmac: Extending support & minor fixes Viresh Kumar
2011-03-03 10:17 ` [PATCH V2 01/13] dw_dmac: Remove compilation dependency from AVR32 and put on HAVE_CLK Viresh Kumar
2011-03-03 10:17 ` [PATCH V2 02/13] dw_dmac: Replace module_init() with subsys_initcall() Viresh Kumar
2011-03-03 10:17 ` [PATCH V2 03/13] dw_dmac: Move single descriptor from dwc->queue to dwc->active_list in dwc_complete_all Viresh Kumar
2011-03-03 10:17 ` [PATCH V2 04/13] dw_dmac: Calling dwc_scan_descriptors from dwc_tx_status() after taking lock Viresh Kumar
2011-03-03 10:17 ` [PATCH V2 05/13] dw_dmac: Adding support for 64 bit access width for memcpy xfers Viresh Kumar
2011-03-03 10:17 ` [PATCH V2 06/13] dw_dmac: Change value of DWC_MAX_COUNT to 4095 Viresh Kumar
2011-03-04 9:56 ` viresh kumar
2011-03-03 10:17 ` [PATCH V2 07/13] dw_dmac: Mark all tx_descriptors with DMA_CRTL_ACK after xfer finish Viresh Kumar
2011-03-03 10:17 ` Viresh Kumar [this message]
2011-03-03 10:17 ` [PATCH V2 09/13] dw_dmac: Pass Channel Priority from platform_data Viresh Kumar
2011-03-03 10:17 ` [PATCH V2 10/13] dw_dmac: Changing type of src_master and dest_master to u8 Viresh Kumar
2011-03-03 10:17 ` [PATCH V2 11/13] dw_dmac: Allow src/dst msize & flow controller to be configured at runtime Viresh Kumar
2011-03-04 9:57 ` viresh kumar
2011-03-03 10:17 ` [PATCH V2 12/13] dw_dmac: Setting Default Burst length for transfers as 16 Viresh Kumar
2011-03-03 10:17 ` [PATCH V2 13/13] avr32: at32ap700x: Specify DMA Flow Controller, Src and Dst msize Viresh Kumar
2011-03-04 10:12 ` [PATCH 06/13 resend] dw_dmac: Change value of DWC_MAX_COUNT to 4095 Viresh Kumar
2011-03-04 10:12 ` [PATCH 11/13 resend] dw_dmac: Allow src/dst msize & flow controller to be configured at runtime Viresh Kumar
2011-03-06 19:45 ` [PATCH V2 00/13] dmaengine/dw_dmac: Extending support & minor fixes Koul, Vinod
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=ae9ffb45b87e19aabeba9321ffffb8ec2b5f5056.1299146382.git.viresh.kumar@st.com \
--to=viresh.kumar@st.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).