diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2012-08-23 01:01:13 (GMT) |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-09-06 16:52:30 (GMT) |
commit | 77975eec149506e457e6abe2ce43259895a9a16e (patch) | |
tree | dd37f163de1b331b3e27806a584e263b37e65301 /drivers/usb/renesas_usbhs | |
parent | f3bb8e63a8ee0398dffe412e774d8801db7e1bf1 (diff) | |
download | linux-fsl-qoriq-77975eec149506e457e6abe2ce43259895a9a16e.tar.xz |
usb: renesas_usbhs: fixup DMA transport data alignment
renesas_usbhs dma can transport 8byte alignment data, not 4byte.
This patch fixup it.
Reported-by: Sugnan Prabhu S <sugnan.prabhu@renesasmobile.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/renesas_usbhs')
-rw-r--r-- | drivers/usb/renesas_usbhs/fifo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index ecd1730..143c4e9 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c @@ -818,7 +818,7 @@ static int usbhsf_dma_prepare_push(struct usbhs_pkt *pkt, int *is_done) usbhs_pipe_is_dcp(pipe)) goto usbhsf_pio_prepare_push; - if (len % 4) /* 32bit alignment */ + if (len & 0x7) /* 8byte alignment */ goto usbhsf_pio_prepare_push; if ((uintptr_t)(pkt->buf + pkt->actual) & 0x7) /* 8byte alignment */ @@ -905,7 +905,7 @@ static int usbhsf_dma_try_pop(struct usbhs_pkt *pkt, int *is_done) /* use PIO if packet is less than pio_dma_border */ len = usbhsf_fifo_rcv_len(priv, fifo); len = min(pkt->length - pkt->actual, len); - if (len % 4) /* 32bit alignment */ + if (len & 0x7) /* 8byte alignment */ goto usbhsf_pio_prepare_pop_unselect; if (len < usbhs_get_dparam(priv, pio_dma_border)) |