Commit 05611a93 authored by Sugar Zhang's avatar Sugar Zhang Committed by Vinod Koul
Browse files

dmaengine: pl330: Remove the burst limit for quirk 'NO-FLUSHP'



There is no reason to limit the performance on the 'NO-FLUSHP' SoCs,
because 'FLUSHP' instruction is broken on these platforms, so remove
the limit to improve the efficiency.

Signed-off-by: default avatarSugar Zhang <sugar.zhang@rock-chips.com>
Link: https://lore.kernel.org/r/1593439555-68130-2-git-send-email-sugar.zhang@rock-chips.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 3621d3e5
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -1183,9 +1183,6 @@ static inline int _ldst_peripheral(struct pl330_dmac *pl330,
{
	int off = 0;

	if (pl330->quirks & PL330_QUIRK_BROKEN_NO_FLUSHP)
		cond = BURST;

	/*
	 * do FLUSHP at beginning to clear any stale dma requests before the
	 * first WFP.
@@ -2221,9 +2218,7 @@ static bool pl330_prep_slave_fifo(struct dma_pl330_chan *pch,

static int fixup_burst_len(int max_burst_len, int quirks)
{
	if (quirks & PL330_QUIRK_BROKEN_NO_FLUSHP)
		return 1;
	else if (max_burst_len > PL330_MAX_BURST)
	if (max_burst_len > PL330_MAX_BURST)
		return PL330_MAX_BURST;
	else if (max_burst_len < 1)
		return 1;
@@ -3128,8 +3123,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
	pd->dst_addr_widths = PL330_DMA_BUSWIDTHS;
	pd->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
	pd->residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
	pd->max_burst = ((pl330->quirks & PL330_QUIRK_BROKEN_NO_FLUSHP) ?
			 1 : PL330_MAX_BURST);
	pd->max_burst = PL330_MAX_BURST;

	ret = dma_async_device_register(pd);
	if (ret) {