aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2012-08-22 21:01:13 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-05 19:52:08 -0400
commita651684c100d47b34acb815d56c0c258565296dc (patch)
tree5cad8beb6faafd0eec74fc77590397521b8585f6
parent3735ba8db8e6ea22ad3ff524328926d8d780a884 (diff)
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/renesas_usbhs/fifo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index ecd173032fd..143c4e9e1be 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)
818 usbhs_pipe_is_dcp(pipe)) 818 usbhs_pipe_is_dcp(pipe))
819 goto usbhsf_pio_prepare_push; 819 goto usbhsf_pio_prepare_push;
820 820
821 if (len % 4) /* 32bit alignment */ 821 if (len & 0x7) /* 8byte alignment */
822 goto usbhsf_pio_prepare_push; 822 goto usbhsf_pio_prepare_push;
823 823
824 if ((uintptr_t)(pkt->buf + pkt->actual) & 0x7) /* 8byte alignment */ 824 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 /* use PIO if packet is less than pio_dma_border */ 905 /* use PIO if packet is less than pio_dma_border */
906 len = usbhsf_fifo_rcv_len(priv, fifo); 906 len = usbhsf_fifo_rcv_len(priv, fifo);
907 len = min(pkt->length - pkt->actual, len); 907 len = min(pkt->length - pkt->actual, len);
908 if (len % 4) /* 32bit alignment */ 908 if (len & 0x7) /* 8byte alignment */
909 goto usbhsf_pio_prepare_pop_unselect; 909 goto usbhsf_pio_prepare_pop_unselect;
910 910
911 if (len < usbhs_get_dparam(priv, pio_dma_border)) 911 if (len < usbhs_get_dparam(priv, pio_dma_border))