Thread (2 messages) 2 messages, 2 authors, 2016-05-12

Re: [PATCH V5 2/3] dmaengine: tegra-adma: Add support for Tegra210 ADMA

From: Vinod Koul <hidden>
Date: 2016-05-12 06:07:48
Also in: linux-devicetree

Possibly related (same subject, not in this thread)

On Fri, Apr 29, 2016 at 03:39:17PM +0100, Jon Hunter wrote:
+static struct dma_async_tx_descriptor *tegra_adma_prep_slave_sg(
+	struct dma_chan *dc, struct scatterlist *sgl, unsigned int sg_len,
+	enum dma_transfer_direction direction, unsigned long flags,
+	void *context)
+{
+	struct tegra_adma_chan *tdc = to_tegra_adma_chan(dc);
+
+	dev_warn(tdc2dev(tdc), "scatter-gather transfers are not supported\n");
+
+	return NULL;
+}
we don't need a place holder, please remove this
+static int tegra_adma_alloc_chan_resources(struct dma_chan *dc)
+{
+	struct tegra_adma_chan *tdc = to_tegra_adma_chan(dc);
+	int ret;
+
+	ret = request_irq(tdc->irq, tegra_adma_isr, 0, dma_chan_name(dc), tdc);
+	if (ret) {
+		dev_err(tdc2dev(tdc), "failed to get interrupt for %s\n",
+			dma_chan_name(dc));
+		return ret;
+	}
Okay why are we requesting and freeing up irq while allocating channels..?
Btw since he usage is cyclic the sound core grabs the channel at start and
never releases it
+	dma_cap_set(DMA_SLAVE, tdma->dma_dev.cap_mask);
+	dma_cap_set(DMA_PRIVATE, tdma->dma_dev.cap_mask);
+	dma_cap_set(DMA_CYCLIC, tdma->dma_dev.cap_mask);
You should set only cyclic, btw why do you support only one. Cyclic is
actually a special case for SLAVE, so ideally you should support slave
too...

-- 
~Vinod
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help