From a2366c039728a418d69841f36b04bb6f8201a71b Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Mon, 29 Jul 2013 15:35:19 -0400 Subject: [PATCH] arm-dma-amba_pl08x-avoid-64bit-division.patch: get rid of another 64-bit division --- arm-dma-amba_pl08x-avoid-64bit-division.patch | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/arm-dma-amba_pl08x-avoid-64bit-division.patch b/arm-dma-amba_pl08x-avoid-64bit-division.patch index 7556e2328..01da25c1f 100644 --- a/arm-dma-amba_pl08x-avoid-64bit-division.patch +++ b/arm-dma-amba_pl08x-avoid-64bit-division.patch @@ -1,5 +1,5 @@ diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c -index 06fe45c..4ce4ac1 100644 +index 06fe45c..63744cf 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c @@ -886,8 +886,8 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x, @@ -13,16 +13,19 @@ index 06fe45c..4ce4ac1 100644 dev_err(&pl08x->adev->dev, "%s src & dst address must be aligned to src" " & dst width if peripheral is flow controller", -@@ -908,7 +908,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x, +@@ -908,9 +908,8 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x, */ if (bd.remainder < mbus->buswidth) early_bytes = bd.remainder; - else if ((mbus->addr) % (mbus->buswidth)) { -+ else if (((u8)(mbus->addr & 0xff)) % (mbus->buswidth)) { - early_bytes = mbus->buswidth - (mbus->addr) % - (mbus->buswidth); +- early_bytes = mbus->buswidth - (mbus->addr) % +- (mbus->buswidth); ++ else if ((early_bytes = (u8)(mbus->addr & 0xff) % mbus->buswidth)) { ++ early_bytes = mbus->buswidth - early_bytes; if ((bd.remainder - early_bytes) < mbus->buswidth) -@@ -928,7 +928,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x, + early_bytes = bd.remainder; + } +@@ -928,7 +927,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x, * Master now aligned * - if slave is not then we must set its width down */