[U-Boot] [PATCH v3 6/7] dwc2: Add dcache support

Stephen Warren swarren at wwwdotorg.org
Fri Jul 24 06:59:45 CEST 2015


On 07/22/2015 12:23 PM, Alexander Stein wrote:
> This adds dcache support for dwc2. The DMA buffers must be DMA aligned and
> is flushed for outgoing transactions before starting transfer. For
> ingoing transactions it is invalidated after the transfer has finished.

> diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c

>  /* We need doubleword-aligned buffers for DMA transfers */
> -DEFINE_ALIGN_BUFFER(uint8_t, aligned_buffer, DWC2_DATA_BUF_SIZE, 8);
> -DEFINE_ALIGN_BUFFER(uint8_t, status_buffer, DWC2_STATUS_BUF_SIZE, 8);
> +DEFINE_ALIGN_BUFFER(uint8_t, aligned_buffer, DWC2_DATA_BUF_SIZE, ARCH_DMA_MINALIGN);
> +DEFINE_ALIGN_BUFFER(uint8_t, status_buffer, DWC2_STATUS_BUF_SIZE, ARCH_DMA_MINALIGN);

That comment might need updating.


More information about the U-Boot mailing list