From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 5 Jul 2012 22:55:29 +0200 Subject: [U-Boot] [PATCH] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment In-Reply-To: References: <1341407039-6018-1-git-send-email-ilya.yanok@cogentembedded.com> <201207052158.04460.marex@denx.de> Message-ID: <201207052255.29490.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Ilya Yanok, > Hi Marek, > > On Thu, Jul 5, 2012 at 11:58 PM, Marek Vasut wrote: > > > Yep. I even thought about this but decided not to do... can't recall > > > why. Now I think it's really a good idea. > > > > > > > Maybe we should create DEFINE_ALIGNED_VARIABLE as a common.h macro? > > > > Like what's in common.h -- ALLOC_CACHE_ALIGN_BUFFER ? > > Yes, but for static variables and not hard-bound to ARCH_DMA_MINALIGN. Good idea :) > > > Hm.. Maybe. Ideas? ;) Actually I also thought about moving all this > > > stuff to a single proper aligned buffer and do flush/invalidate for a > > > whole buffer at once. It can save us some space... but it's BSS > > > anyway... Don't know if it's worth it... > > > > But if you copy stuff back and forth, it'll cause performance hit. > > No, you talk about full bounce-buffering support and meant only one big > buffer for internal structs. Sure, but the internal structs can be aligned on their own, so there's no need for a buffer. > Regards, Ilya. Best regards, Marek Vasut