Commit 77975eec authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Felipe Balbi

usb: renesas_usbhs: fixup DMA transport data alignment

renesas_usbhs dma can transport 8byte alignment data, not 4byte.
This patch fixup it.
Reported-by: default avatarSugnan Prabhu S <sugnan.prabhu@renesasmobile.com>
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent f3bb8e63
...@@ -818,7 +818,7 @@ static int usbhsf_dma_prepare_push(struct usbhs_pkt *pkt, int *is_done) ...@@ -818,7 +818,7 @@ static int usbhsf_dma_prepare_push(struct usbhs_pkt *pkt, int *is_done)
usbhs_pipe_is_dcp(pipe)) usbhs_pipe_is_dcp(pipe))
goto usbhsf_pio_prepare_push; goto usbhsf_pio_prepare_push;
if (len % 4) /* 32bit alignment */ if (len & 0x7) /* 8byte alignment */
goto usbhsf_pio_prepare_push; goto usbhsf_pio_prepare_push;
if ((uintptr_t)(pkt->buf + pkt->actual) & 0x7) /* 8byte alignment */ 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) ...@@ -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 */ /* use PIO if packet is less than pio_dma_border */
len = usbhsf_fifo_rcv_len(priv, fifo); len = usbhsf_fifo_rcv_len(priv, fifo);
len = min(pkt->length - pkt->actual, len); len = min(pkt->length - pkt->actual, len);
if (len % 4) /* 32bit alignment */ if (len & 0x7) /* 8byte alignment */
goto usbhsf_pio_prepare_pop_unselect; goto usbhsf_pio_prepare_pop_unselect;
if (len < usbhs_get_dparam(priv, pio_dma_border)) if (len < usbhs_get_dparam(priv, pio_dma_border))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment