Commit fdf475fa authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Vinod Koul
Browse files

dw_dmac: remove unnecessary tx_list field in dw_dma_chan



The soft LLP mode is working for active descriptor only. So, we do not need to
have a copy of its pointer.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 985a6c7d
Loading
Loading
Loading
Loading
+15 −5
Original line number Original line Diff line number Diff line
@@ -282,9 +282,9 @@ static void dwc_dostart(struct dw_dma_chan *dwc, struct dw_desc *first)


		dwc_initialize(dwc);
		dwc_initialize(dwc);


		dwc->tx_list = &first->tx_list;
		dwc->tx_node_active = &first->tx_list;
		dwc->tx_node_active = &first->tx_list;


		/* Submit first block */
		dwc_do_single_block(dwc, first);
		dwc_do_single_block(dwc, first);


		return;
		return;
@@ -402,15 +402,25 @@ static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan *dwc)
		dma_writel(dw, CLEAR.XFER, dwc->mask);
		dma_writel(dw, CLEAR.XFER, dwc->mask);


		if (test_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags)) {
		if (test_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags)) {
			if (dwc->tx_node_active != dwc->tx_list) {
			struct list_head *head, *active = dwc->tx_node_active;
				desc = to_dw_desc(dwc->tx_node_active);

			/*
			 * We are inside first active descriptor.
			 * Otherwise something is really wrong.
			 */
			desc = dwc_first_active(dwc);

			head = &desc->tx_list;
			if (active != head) {
				child = to_dw_desc(active);


				/* Submit next block */
				/* Submit next block */
				dwc_do_single_block(dwc, desc);
				dwc_do_single_block(dwc, child);
				spin_unlock_irqrestore(&dwc->lock, flags);


				spin_unlock_irqrestore(&dwc->lock, flags);
				return;
				return;
			}
			}

			/* We are done here */
			/* We are done here */
			clear_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags);
			clear_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags);
		}
		}
+0 −1
Original line number Original line Diff line number Diff line
@@ -194,7 +194,6 @@ struct dw_dma_chan {
	bool				initialized;
	bool				initialized;


	/* software emulation of the LLP transfers */
	/* software emulation of the LLP transfers */
	struct list_head	*tx_list;
	struct list_head	*tx_node_active;
	struct list_head	*tx_node_active;


	spinlock_t		lock;
	spinlock_t		lock;