dmaengine: pl330: Remove the burst limit for quirk 'NO-FLUSHP'
authorSugar Zhang <sugar.zhang@rock-chips.com>
Mon, 29 Jun 2020 14:05:42 +0000 (22:05 +0800)
committerVinod Koul <vkoul@kernel.org>
Wed, 15 Jul 2020 05:55:11 +0000 (11:25 +0530)
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: Sugar 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: Vinod Koul <vkoul@kernel.org>
drivers/dma/pl330.c

index 6a158eef6b8ad8e1a4cededbc158e50537922e3f..7686292bc1dbde325ffdba92c9615799f9703eac 100644 (file)
@@ -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) {