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

Commit 7847f6b5 authored by Russell King's avatar Russell King
Browse files

dmaengine: PL08x: remove waiting descriptor pointer



As we no longer need to pass a descriptor to prep_phy_channel(), we
don't need to keep track of the descriptor which is waiting for a
channel to become available.  So let's get rid of it.

Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Tested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent c48d4963
Loading
Loading
Loading
Loading
+1 −7
Original line number Original line Diff line number Diff line
@@ -223,8 +223,6 @@ enum pl08x_dma_chan_state {
 * @host: a pointer to the host (internal use)
 * @host: a pointer to the host (internal use)
 * @state: whether the channel is idle, paused, running etc
 * @state: whether the channel is idle, paused, running etc
 * @slave: whether this channel is a device (slave) or for memcpy
 * @slave: whether this channel is a device (slave) or for memcpy
 * @waiting: a TX descriptor on this channel which is waiting for a physical
 * channel to become available
 * @signal: the physical DMA request signal which this channel is using
 * @signal: the physical DMA request signal which this channel is using
 * @mux_use: count of descriptors using this DMA request signal setting
 * @mux_use: count of descriptors using this DMA request signal setting
 */
 */
@@ -243,7 +241,6 @@ struct pl08x_dma_chan {
	struct pl08x_driver_data *host;
	struct pl08x_driver_data *host;
	enum pl08x_dma_chan_state state;
	enum pl08x_dma_chan_state state;
	bool slave;
	bool slave;
	struct pl08x_txd *waiting;
	int signal;
	int signal;
	unsigned mux_use;
	unsigned mux_use;
};
};
@@ -1074,7 +1071,6 @@ static dma_cookie_t pl08x_tx_submit(struct dma_async_tx_descriptor *tx)
	if (!plchan->slave && !plchan->phychan) {
	if (!plchan->slave && !plchan->phychan) {
		/* Do this memcpy whenever there is a channel ready */
		/* Do this memcpy whenever there is a channel ready */
		plchan->state = PL08X_CHAN_WAITING;
		plchan->state = PL08X_CHAN_WAITING;
		plchan->waiting = txd;
	} else {
	} else {
		plchan->phychan_hold--;
		plchan->phychan_hold--;
	}
	}
@@ -1696,8 +1692,7 @@ static void pl08x_tasklet(unsigned long data)
		 */
		 */
		list_for_each_entry(waiting, &pl08x->memcpy.channels,
		list_for_each_entry(waiting, &pl08x->memcpy.channels,
				    chan.device_node) {
				    chan.device_node) {
			if (waiting->state == PL08X_CHAN_WAITING &&
			if (waiting->state == PL08X_CHAN_WAITING) {
				waiting->waiting != NULL) {
				int ret;
				int ret;


				/* This should REALLY not fail now */
				/* This should REALLY not fail now */
@@ -1705,7 +1700,6 @@ static void pl08x_tasklet(unsigned long data)
				BUG_ON(ret);
				BUG_ON(ret);
				waiting->phychan_hold--;
				waiting->phychan_hold--;
				waiting->state = PL08X_CHAN_RUNNING;
				waiting->state = PL08X_CHAN_RUNNING;
				waiting->waiting = NULL;
				pl08x_issue_pending(&waiting->chan);
				pl08x_issue_pending(&waiting->chan);
				break;
				break;
			}
			}