mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 08:01:08 +00:00
usb: dwc2: Align size of invalidating dcache before starting DMA
During using dwc2 usb gadget, if usb message size is too small, following cache misaligned warning is shown: CACHE: Misaligned operation at range [bfdbcb00, bfdbcb04] Align size of invalidating dcache before starting DMA to remove the warning. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
This commit is contained in:
parent
2e5026a2f0
commit
a939af0c74
1 changed files with 2 additions and 1 deletions
|
@ -111,7 +111,8 @@ static int setdma_rx(struct dwc2_ep *ep, struct dwc2_request *req)
|
|||
ctrl = readl(®->out_endp[ep_num].doepctl);
|
||||
|
||||
invalidate_dcache_range((unsigned long) ep->dma_buf,
|
||||
(unsigned long) ep->dma_buf + ep->len);
|
||||
(unsigned long) ep->dma_buf +
|
||||
ROUND(ep->len, CONFIG_SYS_CACHELINE_SIZE));
|
||||
|
||||
writel((unsigned int) ep->dma_buf, ®->out_endp[ep_num].doepdma);
|
||||
writel(DOEPT_SIZ_PKT_CNT(pktcnt) | DOEPT_SIZ_XFER_SIZE(length),
|
||||
|
|
Loading…
Reference in a new issue