Thread (102 messages) 102 messages, 7 authors, 2011-09-20

[PATCH 12/18] dmaengine/amba-pl08x: Add prep_single_byte_llis() routine

From: Russell King - ARM Linux <hidden>
Date: 2011-07-29 11:10:05
Also in: lkml

On Fri, Jul 29, 2011 at 04:19:22PM +0530, Viresh Kumar wrote:
quoted hunk ↗ jump to hunk
Code for creating single byte llis is present at several places. Create a
routine to avoid code redundancy.

Also, we don't need one lli per single byte transfer, we can have single lli to
do all single byte transfer.

Signed-off-by: Viresh Kumar <redacted>
---
 drivers/dma/amba-pl08x.c |   61 +++++++++++++++++++++++++---------------------
 1 files changed, 33 insertions(+), 28 deletions(-)
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index 3b7357e..590397d 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -552,6 +552,14 @@ static void pl08x_fill_lli_for_desc(struct pl08x_lli_build_data *bd,
 	bd->remainder -= len;
 }
 
+static inline void prep_byte_width_lli(struct pl08x_lli_build_data *bd,
+		u32 *cctl, u32 len, int num_llis, size_t *total_bytes)
+{
+		*cctl = pl08x_cctl_bits(*cctl, 1, 1, len);
+		pl08x_fill_lli_for_desc(bd, num_llis, len, *cctl);
+		(*total_bytes) += len;
Seeing as your patch series started with a cleanup of spacing/tabbing,
it's surprising to find a patch introducing new code which has broken
tabbing.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help