Re: [U-Boot] [PATCH] smsc95xx: align buffers to cache line size

2012-07-10 Thread Marek Vasut
Dear Ilya Yanok, > On Tue, Jul 10, 2012 at 1:34 PM, Marek Vasut wrote: > > > > aligned to > > > > 16 bytes for arch with 16 byte cachelines. > > > > > > Yes, and this is exactly what we need. > > > > > > > ALLOC_CACHE_ALIGN_BUFFER(u32, tmpbuf, 1); this stuff maybe? It'll be > > > > It isn't, E

Re: [U-Boot] [PATCH] smsc95xx: align buffers to cache line size

2012-07-10 Thread Ilya Yanok
On Tue, Jul 10, 2012 at 1:34 PM, Marek Vasut wrote: > > > aligned to > > > 16 bytes for arch with 16 byte cachelines. > > > > Yes, and this is exactly what we need. > > > > ALLOC_CACHE_ALIGN_BUFFER(u32, tmpbuf, 1); this stuff maybe? It'll be > It isn't, EHCI needs it aligned on 32 byte boundary.

Re: [U-Boot] [PATCH] smsc95xx: align buffers to cache line size

2012-07-10 Thread Marek Vasut
Dear Ilya Yanok, > Hi Marek, > > On Tue, Jul 10, 2012 at 6:17 AM, Marek Vasut wrote: > > > Well, of course we need proper alignment for cache stuff (well, > > > actually > > > > we > > > > > can skip this alignment thing for the buffer we will flush as long as > > > all buffers we are going to

Re: [U-Boot] [PATCH] smsc95xx: align buffers to cache line size

2012-07-10 Thread Ilya Yanok
Hi Marek, On Tue, Jul 10, 2012 at 6:17 AM, Marek Vasut wrote: > > Well, of course we need proper alignment for cache stuff (well, actually > we > > can skip this alignment thing for the buffer we will flush as long as all > > buffers we are going to invalidate are properly aligned/sized... but >

Re: [U-Boot] [PATCH] smsc95xx: align buffers to cache line size

2012-07-09 Thread Marek Vasut
Dear Ilya Yanok, > Dear Marek, > > On Mon, Jul 9, 2012 at 4:45 AM, Marek Vasut wrote: > > > But in practice it works without any alignment... ok, you made me read > > > > the > > > > > spec ;) > > > page 55: "For the page 0 current offset interpretation, this field is > > > the byte offset int

Re: [U-Boot] [PATCH] smsc95xx: align buffers to cache line size

2012-07-09 Thread Ilya Yanok
Dear Marek, On Mon, Jul 9, 2012 at 4:45 AM, Marek Vasut wrote: > > > But in practice it works without any alignment... ok, you made me read > the > > spec ;) > > page 55: "For the page 0 current offset interpretation, this field is the > > byte offset into the current page" > > > See the thread

Re: [U-Boot] [PATCH] smsc95xx: align buffers to cache line size

2012-07-08 Thread Marek Vasut
Dear Ilya Yanok, > Dear Marek, > > On Mon, Jul 9, 2012 at 1:31 AM, Marek Vasut wrote: > > > non-ARMv7 system now to do some testing... > > > But it used to work without any alignment, right? (with disabled > > > dcache, > > > > of > > > > > course) > > > That makes me think that data buffers d

Re: [U-Boot] [PATCH] smsc95xx: align buffers to cache line size

2012-07-08 Thread Ilya Yanok
Dear Marek, On Mon, Jul 9, 2012 at 1:31 AM, Marek Vasut wrote: > > non-ARMv7 system now to do some testing... > > But it used to work without any alignment, right? (with disabled dcache, > of > > course) > > That makes me think that data buffers don't need any alignment (from USB > > pov, not ca

Re: [U-Boot] [PATCH] smsc95xx: align buffers to cache line size

2012-07-08 Thread Marek Vasut
Dear Ilya Yanok, > Dear Marek, > > On Sun, Jul 8, 2012 at 10:59 PM, Marek Vasut wrote: > > btw. this will fail with cache line < 32 . > > Hm.. I have to admit I'm not very much into USB specs and I don't have any > non-ARMv7 system now to do some testing... > But it used to work without any ali

Re: [U-Boot] [PATCH] smsc95xx: align buffers to cache line size

2012-07-08 Thread Ilya Yanok
Dear Marek, On Sun, Jul 8, 2012 at 10:59 PM, Marek Vasut wrote: > btw. this will fail with cache line < 32 . > Hm.. I have to admit I'm not very much into USB specs and I don't have any non-ARMv7 system now to do some testing... But it used to work without any alignment, right? (with disabled d

Re: [U-Boot] [PATCH] smsc95xx: align buffers to cache line size

2012-07-08 Thread Marek Vasut
Dear Ilya Yanok, > Align buffers passed to the USB code to cache line size so > they can be DMAed safely. > > Signed-off-by: Ilya Yanok > --- > Depens on Marek's patch [1] for DEFINE_CACHE_ALIGN_BUFFER. Isn't it your patch anyway? You should get the credit for that series, you know ... btw. t

[U-Boot] [PATCH] smsc95xx: align buffers to cache line size

2012-07-08 Thread Ilya Yanok
Align buffers passed to the USB code to cache line size so they can be DMAed safely. Signed-off-by: Ilya Yanok --- Depens on Marek's patch [1] for DEFINE_CACHE_ALIGN_BUFFER. [1] http://patchwork.ozlabs.org/patch/169619/ drivers/usb/eth/smsc95xx.c | 13 + 1 file changed, 9 inserti