]> git.baikalelectronics.ru Git - uboot.git/commit
usb: dwc2: invalidate the dcache before starting the DMA
authorEddie Cai <eddie.cai.linux@gmail.com>
Thu, 6 Apr 2017 03:37:04 +0000 (11:37 +0800)
committerMarek Vasut <marex@denx.de>
Fri, 14 Apr 2017 14:44:16 +0000 (16:44 +0200)
commit334778a9519b708c1a7b7886fdca1a45855e1f51
tree3156baad07499a98e8568005bb99306d4f7efb56
parenta26587a020cac6551f9a28db43c4612abab5dfbc
usb: dwc2: invalidate the dcache before starting the DMA

We should invalidate the dcache before starting the DMA. In case there are
any dirty lines from the DMA buffer in the cache, subsequent cache-line
replacements may corrupt the buffer in memory while the DMA is still going on.
Cache-line replacement can happen if the CPU tries to bring some other memory
locations into the cache while the DMA is going on.

Signed-off-by: Eddie Cai <eddie.cai.linux@gmail.com>
Reviewed-by: Stefan BrĂ¼ns <stefan.bruens@rwth-aachen.de>
drivers/usb/host/dwc2.c