Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1337318 > unrolled thread

Cleanups and improvenments for pl330

Started byAlexander Kochetkov <al.kochet@gmail.com>
First post2016-02-18 13:40 +0100
Last post2016-02-18 13:40 +0100
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  Cleanups and improvenments for pl330 Alexander Kochetkov <al.kochet@gmail.com> - 2016-02-18 13:40 +0100
    [PATCH 3/4] dmaengine: pl330: don't emit code for one iteration loop Alexander Kochetkov <al.kochet@gmail.com> - 2016-02-18 13:40 +0100

#1337318 — Cleanups and improvenments for pl330

FromAlexander Kochetkov <al.kochet@gmail.com>
Date2016-02-18 13:40 +0100
SubjectCleanups and improvenments for pl330
Message-ID<r3w2e-5u1-11@gated-at.bofh.it>
The patch series of 4 patches contain some pl330 driver cleanups and
implement free running mode for cyclic transfers. It affect recent
patches for pl330. Please review it and check on real boards (if possible).

Rebased on top of branch 'topic/pl330' of
https://git.kernel.org/cgit/linux/kernel/git/vkoul/slave-dma.git/

Tested on rk3188 Radxa rock board.

[toc] | [next] | [standalone]


#1337320 — [PATCH 3/4] dmaengine: pl330: don't emit code for one iteration loop

FromAlexander Kochetkov <al.kochet@gmail.com>
Date2016-02-18 13:40 +0100
Subject[PATCH 3/4] dmaengine: pl330: don't emit code for one iteration loop
Message-ID<r3w2f-5u1-35@gated-at.bofh.it>
In reply to#1337318
The patch remove one iteration outer loop in the _loop().

    DMALP_0 0
    ...
    DMALPENDA_0 bjmpto_9

Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
---
 drivers/dma/pl330.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 9ce6c10..711ea58 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -1258,7 +1258,7 @@ static inline int _loop(unsigned dry_run, u8 buf[],
 	lpend.bjump = 0;
 	szlpend = _emit_LPEND(1, buf, &lpend);
 
-	if (lcnt0) {
+	if (lcnt0 > 1) {
 		szlp *= 2;
 		szlpend *= 2;
 	}
@@ -1274,7 +1274,7 @@ static inline int _loop(unsigned dry_run, u8 buf[],
 
 	off = 0;
 
-	if (lcnt0) {
+	if (lcnt0 > 1) {
 		off += _emit_LP(dry_run, &buf[off], 0, lcnt0);
 		ljmp0 = off;
 	}
@@ -1290,7 +1290,7 @@ static inline int _loop(unsigned dry_run, u8 buf[],
 	lpend.bjump = off - ljmp1;
 	off += _emit_LPEND(dry_run, &buf[off], &lpend);
 
-	if (lcnt0) {
+	if (lcnt0 > 1) {
 		lpend.cond = ALWAYS;
 		lpend.forever = false;
 		lpend.loop = 0;
@@ -1299,7 +1299,7 @@ static inline int _loop(unsigned dry_run, u8 buf[],
 	}
 
 	*bursts = lcnt1 * cyc;
-	if (lcnt0)
+	if (lcnt0 > 1)
 		*bursts *= lcnt0;
 
 	return off;
-- 
1.7.9.5

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web