[U-Boot] [PATCH v4 4/4] usb: dwc2 : invalidate dcache before starting DMA

Simon Glass sjg at chromium.org
Fri Jul 15 05:56:49 CEST 2016


On 14 July 2016 at 21:20, Simon Glass <sjg at chromium.org> wrote:
> On 14 July 2016 at 00:52, Ziyuan Xu <xzy.xu at rock-chips.com> wrote:
>> From: Xu Ziyuan <xzy.xu at rock-chips.com>
>>
>> Invalidate dcache before starting the DMA to ensure coherency. 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: Ziyuan Xu <xzy.xu at rock-chips.com>
>>
>> ---
>>
>> Changes in v4: None
>> Changes in v3:
>> - New commit since v3 to fix the coherence issue between memory and
>> cache
>>
>> Changes in v2: None
>>
>>  drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c | 3 +++
>>  1 file changed, 3 insertions(+)
>
> Acked-by: Simon Glass <sjg at chromium.org>

Applied to u-boot-rockchip, thanks!


More information about the U-Boot mailing list