summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLukasz Majewski <l.majewski@samsung.com>2013-10-08 14:30:37 +0200
committerMarek Vasut <marex@denx.de>2013-10-20 23:42:40 +0200
commit57ffabe37114fe67f5ffac5805b343e4e1979b57 (patch)
tree3491fb814c96cbbbb6a9f593587be4000c8986ed /drivers
parent98f686c26f99776fafca55dbff6eb24045fa4108 (diff)
usb:udc:s3c: Reduce dcache invalidate range for UDC receive buffer
The s3c udc driver sends data in a max packet size. Therefore the dcache invalidate range shall be equal to max packet, not the entire DMA_BUFFER_SIZE. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/s3c_udc_otg_xfer_dma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c b/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
index d7af5e9034..1cbf8f60a7 100644
--- a/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
+++ b/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
@@ -117,7 +117,8 @@ static int setdma_rx(struct s3c_ep *ep, struct s3c_request *req)
invalidate_dcache_range((unsigned long) ep->dev->dma_buf[ep_num],
(unsigned long) ep->dev->dma_buf[ep_num]
- + DMA_BUFFER_SIZE);
+ + ROUND(ep->ep.maxpacket,
+ CONFIG_SYS_CACHELINE_SIZE));
if (length == 0)
pktcnt = 1;