Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acdf2fc8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull [GIT PULL] slave-dmaengine fixes from Vinod Koul.

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine/amba-pl08x : reset phychan_hold on terminate all
  dma: pl330: fix a couple of compilation warnings
  dma/ste_dma40: fix erroneous comparison
  dma/ste_dma40: explicitly include regulator consumer header
  dma40: Improve the logic of stopping logical chan
  dmaengine: at_hdmac: remove clear-on-read in atc_dostart()
  dma: mxs-dma: enable channel in device_issue_pending call
  dmaengine: imx-dma: dont complete descriptor for cyclic dma
parents 2390c0fc 88c08a3f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1429,6 +1429,7 @@ static int pl08x_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
			 * signal
			 */
			release_phy_channel(plchan);
			plchan->phychan_hold = 0;
		}
		/* Dequeue jobs and free LLIs */
		if (plchan->at) {
+0 −4
Original line number Diff line number Diff line
@@ -221,10 +221,6 @@ static void atc_dostart(struct at_dma_chan *atchan, struct at_desc *first)

	vdbg_dump_regs(atchan);

	/* clear any pending interrupt */
	while (dma_readl(atdma, EBCISR))
		cpu_relax();

	channel_writel(atchan, SADDR, 0);
	channel_writel(atchan, DADDR, 0);
	channel_writel(atchan, CTRLA, 0);
+6 −3
Original line number Diff line number Diff line
@@ -571,11 +571,14 @@ static void imxdma_tasklet(unsigned long data)
	if (desc->desc.callback)
		desc->desc.callback(desc->desc.callback_param);

	dma_cookie_complete(&desc->desc);

	/* If we are dealing with a cyclic descriptor keep it on ld_active */
	/* If we are dealing with a cyclic descriptor keep it on ld_active
	 * and dont mark the descripor as complete.
	 * Only in non-cyclic cases it would be marked as complete
	 */
	if (imxdma_chan_is_doing_cyclic(imxdmac))
		goto out;
	else
		dma_cookie_complete(&desc->desc);

	/* Free 2D slot if it was an interleaved transfer */
	if (imxdmac->enabled_2d) {
+3 −7
Original line number Diff line number Diff line
@@ -201,10 +201,6 @@ static struct mxs_dma_chan *to_mxs_dma_chan(struct dma_chan *chan)

static dma_cookie_t mxs_dma_tx_submit(struct dma_async_tx_descriptor *tx)
{
	struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(tx->chan);

	mxs_dma_enable_chan(mxs_chan);

	return dma_cookie_assign(tx);
}

@@ -558,9 +554,9 @@ static enum dma_status mxs_dma_tx_status(struct dma_chan *chan,

static void mxs_dma_issue_pending(struct dma_chan *chan)
{
	/*
	 * Nothing to do. We only have a single descriptor.
	 */
	struct mxs_dma_chan *mxs_chan = to_mxs_dma_chan(chan);

	mxs_dma_enable_chan(mxs_chan);
}

static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma)
+15 −10
Original line number Diff line number Diff line
@@ -2225,12 +2225,9 @@ static inline void free_desc_list(struct list_head *list)
{
	struct dma_pl330_dmac *pdmac;
	struct dma_pl330_desc *desc;
	struct dma_pl330_chan *pch;
	struct dma_pl330_chan *pch = NULL;
	unsigned long flags;

	if (list_empty(list))
		return;

	/* Finish off the work list */
	list_for_each_entry(desc, list, node) {
		dma_async_tx_callback callback;
@@ -2247,6 +2244,10 @@ static inline void free_desc_list(struct list_head *list)
		desc->pchan = NULL;
	}

	/* pch will be unset if list was empty */
	if (!pch)
		return;

	pdmac = pch->dmac;

	spin_lock_irqsave(&pdmac->pool_lock, flags);
@@ -2257,12 +2258,9 @@ static inline void free_desc_list(struct list_head *list)
static inline void handle_cyclic_desc_list(struct list_head *list)
{
	struct dma_pl330_desc *desc;
	struct dma_pl330_chan *pch;
	struct dma_pl330_chan *pch = NULL;
	unsigned long flags;

	if (list_empty(list))
		return;

	list_for_each_entry(desc, list, node) {
		dma_async_tx_callback callback;

@@ -2274,6 +2272,10 @@ static inline void handle_cyclic_desc_list(struct list_head *list)
			callback(desc->txd.callback_param);
	}

	/* pch will be unset if list was empty */
	if (!pch)
		return;

	spin_lock_irqsave(&pch->lock, flags);
	list_splice_tail_init(list, &pch->work_list);
	spin_unlock_irqrestore(&pch->lock, flags);
@@ -2926,8 +2928,11 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
	INIT_LIST_HEAD(&pd->channels);

	/* Initialize channel parameters */
	num_chan = max(pdat ? pdat->nr_valid_peri : (u8)pi->pcfg.num_peri,
			(u8)pi->pcfg.num_chan);
	if (pdat)
		num_chan = max_t(int, pdat->nr_valid_peri, pi->pcfg.num_chan);
	else
		num_chan = max_t(int, pi->pcfg.num_peri, pi->pcfg.num_chan);

	pdmac->peripherals = kzalloc(num_chan * sizeof(*pch), GFP_KERNEL);

	for (i = 0; i < num_chan; i++) {
Loading