From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Thu, 23 Jul 2015 22:59:45 -0600 Subject: [U-Boot] [PATCH v3 6/7] dwc2: Add dcache support In-Reply-To: <1437589418-11978-7-git-send-email-alexanders83@web.de> References: <1437589418-11978-1-git-send-email-alexanders83@web.de> <1437589418-11978-7-git-send-email-alexanders83@web.de> Message-ID: <55B1C641.8080807@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.