2013-07-29 15:57:43 +00:00
|
|
|
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
|
2013-07-29 19:35:19 +00:00
|
|
|
index 06fe45c..63744cf 100644
|
2013-07-29 15:57:43 +00:00
|
|
|
--- 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,
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
- if ((bd.srcbus.addr % bd.srcbus.buswidth) ||
|
|
|
|
- (bd.dstbus.addr % bd.dstbus.buswidth)) {
|
|
|
|
+ if ((((u8)(bd.srcbus.addr & 0xff)) % bd.srcbus.buswidth) ||
|
|
|
|
+ (((u8)(bd.dstbus.addr & 0xff)) % bd.dstbus.buswidth)) {
|
|
|
|
dev_err(&pl08x->adev->dev,
|
|
|
|
"%s src & dst address must be aligned to src"
|
|
|
|
" & dst width if peripheral is flow controller",
|
2013-07-29 19:35:19 +00:00
|
|
|
@@ -908,9 +908,8 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
|
2013-07-29 15:57:43 +00:00
|
|
|
*/
|
|
|
|
if (bd.remainder < mbus->buswidth)
|
|
|
|
early_bytes = bd.remainder;
|
|
|
|
- else if ((mbus->addr) % (mbus->buswidth)) {
|
2013-07-29 19:35:19 +00:00
|
|
|
- early_bytes = mbus->buswidth - (mbus->addr) %
|
|
|
|
- (mbus->buswidth);
|
|
|
|
+ else if ((early_bytes = (u8)(mbus->addr & 0xff) % mbus->buswidth)) {
|
|
|
|
+ early_bytes = mbus->buswidth - early_bytes;
|
2013-07-29 15:57:43 +00:00
|
|
|
if ((bd.remainder - early_bytes) < mbus->buswidth)
|
2013-07-29 19:35:19 +00:00
|
|
|
early_bytes = bd.remainder;
|
|
|
|
}
|
|
|
|
@@ -928,7 +927,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
|
2013-07-29 15:57:43 +00:00
|
|
|
* Master now aligned
|
|
|
|
* - if slave is not then we must set its width down
|
|
|
|
*/
|
|
|
|
- if (sbus->addr % sbus->buswidth) {
|
|
|
|
+ if (((u8)(sbus->addr & 0xff)) % sbus->buswidth) {
|
|
|
|
dev_dbg(&pl08x->adev->dev,
|
|
|
|
"%s set down bus width to one byte\n",
|
|
|
|
__func__);
|