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

Commit 70cf644c authored by Anuj Aggarwal's avatar Anuj Aggarwal Committed by Tony Lindgren
Browse files

omap: SDMA: Fixing bug in omap_dma_set_global_params()



Argument tparams was not being used to program
global register GCR.HI_THREAD_RESERVED. This patch fixes the same.

Signed-off-by: default avatarAnuj Aggarwal <anuj.aggarwal@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent dc6e56b1
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -829,7 +829,7 @@ EXPORT_SYMBOL(omap_free_dma);
 *
 * @param arb_rate
 * @param max_fifo_depth
 * @param tparams - Number of thereads to reserve : DMA_THREAD_RESERVE_NORM
 * @param tparams - Number of threads to reserve : DMA_THREAD_RESERVE_NORM
 * 						   DMA_THREAD_RESERVE_ONET
 * 						   DMA_THREAD_RESERVE_TWOT
 * 						   DMA_THREAD_RESERVE_THREET
@@ -844,11 +844,14 @@ omap_dma_set_global_params(int arb_rate, int max_fifo_depth, int tparams)
		return;
	}

	if (max_fifo_depth == 0)
		max_fifo_depth = 1;
	if (arb_rate == 0)
		arb_rate = 1;

	reg = (arb_rate & 0xff) << 16;
	reg |= (0xff & max_fifo_depth);
	reg = 0xff & max_fifo_depth;
	reg |= (0x3 & tparams) << 12;
	reg |= (arb_rate & 0xff) << 16;

	dma_write(reg, GCR);
}