linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dma: edma: add device_slave_caps() support
@ 2013-07-23 16:43 Joel Fernandes
  2013-07-24  8:03 ` Lars-Peter Clausen
  0 siblings, 1 reply; 14+ messages in thread
From: Joel Fernandes @ 2013-07-23 16:43 UTC (permalink / raw)
  To: Vinod Koul, Dan Williams
  Cc: Balaji TK, Arnd Bergmann, Tony Lindgren, Linux MMC List,
	Rajendra Nayak, Sekhar Nori, Koen Kooi, Rob Herring,
	Linux Kernel Mailing List, Lokesh Vutla, Jason Kridner,
	Santosh Shilimkar, Joel Fernandes, Linux OMAP List,
	Linux ARM Kernel List, Matt Porter

Implement device_slave_caps(). EDMA has a limited number of slots.
Slave drivers such as omap_hsmmc will query the driver to make
sure they don't pass in more than these many scatter segments.

Signed-off-by: Joel Fernandes <joelf@ti.com>
---
Vinod, or Dan- If this patch looks ok, can you please merge in for
-rc cycle? This patch is required to fix MMC support on AM33xx. This
patch is blocking 3 other patches which fix various MMC things. Thanks!

Notes:
(1) this approach is temporary and only for -rc cycle to fix MMC on
AM335x. It will be replace by the RFC series in future kernels:
http://www.spinics.net/lists/arm-kernel/msg260094.html

(2) Patch depends Vinod's patch at:
http://permalink.gmane.org/gmane.linux.kernel/1525112

 drivers/dma/edma.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 7222cbe..81d5429 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -517,6 +517,14 @@ static void edma_issue_pending(struct dma_chan *chan)
 	spin_unlock_irqrestore(&echan->vchan.lock, flags);
 }
 
+static inline int edma_slave_caps(struct dma_chan *chan,
+	struct dma_slave_caps *caps)
+{
+	caps->max_sg_nr = MAX_NR_SG;
+
+	return 0;
+}
+
 static size_t edma_desc_size(struct edma_desc *edesc)
 {
 	int i;
@@ -594,6 +602,7 @@ static void edma_dma_init(struct edma_cc *ecc, struct dma_device *dma,
 	dma->device_issue_pending = edma_issue_pending;
 	dma->device_tx_status = edma_tx_status;
 	dma->device_control = edma_control;
+	dma->device_slave_caps = edma_slave_caps;
 	dma->dev = dev;
 
 	INIT_LIST_HEAD(&dma->channels);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-07-30  4:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-23 16:43 [PATCH] dma: edma: add device_slave_caps() support Joel Fernandes
2013-07-24  8:03 ` Lars-Peter Clausen
2013-07-24  8:11   ` Joel Fernandes
2013-07-24  8:24     ` Lars-Peter Clausen
2013-07-24  8:28       ` Fernandes, Joel
2013-07-24  8:40         ` Lars-Peter Clausen
2013-07-24 18:55           ` Joel Fernandes
2013-07-24 18:33             ` Vinod Koul
2013-07-24 19:36               ` Joel Fernandes
2013-07-25  7:23                 ` Vinod Koul
2013-07-29  9:45                   ` Vinod Koul
2013-07-30  4:39                     ` Joel Fernandes
2013-07-24 19:15             ` Lars-Peter Clausen
2013-07-25  3:21               ` Fernandes, Joel

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).