diff options
author | Michal Suchanek <hramrach@gmail.com> | 2015-07-23 18:04:49 +0200 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-08-19 22:11:46 +0530 |
commit | 31495d60a06524f37a9ea66d7d62ce0418ef3506 (patch) | |
tree | 2098e539c03e0261d8e210e2dc3496cdbe4b99f7 | |
parent | 2f27b81c0e5670fbdd902ca8f85617153d69b8cb (diff) | |
download | linux-31495d60a06524f37a9ea66d7d62ce0418ef3506.tar.bz2 |
dmaengine: pl330: do not emit loop for 1 byte transfer.
When there is only one burst required do not emit loop instructions to
loop exactly once. Emit just the body of the loop.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/pl330.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index f513f77b1d85..257e0d90475a 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -1198,6 +1198,9 @@ static inline int _loop(unsigned dry_run, u8 buf[], unsigned lcnt0, lcnt1, ljmp0, ljmp1; struct _arg_LPEND lpend; + if (*bursts == 1) + return _bursts(dry_run, buf, pxs, 1); + /* Max iterations possible in DMALP is 256 */ if (*bursts >= 256*256) { lcnt1 = 256; |