Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-29 Thread Anton Staaf
On Mon, Aug 29, 2011 at 4:01 PM, Scott Wood wrote: > On 08/29/2011 05:49 PM, Anton Staaf wrote: > How do you make the declaration static? you can't with this version of the macro.  Are there cases where you need the buffer to be static? >>> >>> I think you'd want it to be static

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-29 Thread Scott Wood
On 08/29/2011 05:49 PM, Anton Staaf wrote: How do you make the declaration static? >>> >>> you can't with this version of the macro. Are there cases where you >>> need the buffer to be static? >> >> I think you'd want it to be static more often than not. > > If the buffer is allocated at fil

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-29 Thread Anton Staaf
On Mon, Aug 29, 2011 at 3:03 PM, Scott Wood wrote: > On 08/29/2011 04:54 PM, Anton Staaf wrote: >> On Mon, Aug 29, 2011 at 2:23 PM, Scott Wood wrote: >>> With the version in that patch I get the slightly different "error: >>> initializer element is not computable at load time".  Seems like whethe

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-29 Thread Scott Wood
On 08/29/2011 04:54 PM, Anton Staaf wrote: > On Mon, Aug 29, 2011 at 2:23 PM, Scott Wood wrote: >> With the version in that patch I get the slightly different "error: >> initializer element is not computable at load time". Seems like whether >> you cast the address to (type *) or (void *) determi

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-29 Thread Anton Staaf
On Mon, Aug 29, 2011 at 2:23 PM, Scott Wood wrote: > On 08/29/2011 03:58 PM, Anton Staaf wrote: >> On Mon, Aug 29, 2011 at 1:47 PM, Scott Wood wrote: >>> On 08/29/2011 03:12 PM, Anton Staaf wrote: 1) Mikes's macro #define DMA_ALIGN_SIZE(size) \        (((size) + CONFIG_SYS_CAC

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-29 Thread Scott Wood
On 08/29/2011 03:58 PM, Anton Staaf wrote: > On Mon, Aug 29, 2011 at 1:47 PM, Scott Wood wrote: >> On 08/29/2011 03:12 PM, Anton Staaf wrote: >>> 1) Mikes's macro >>> >>> #define DMA_ALIGN_SIZE(size) \ >>>(((size) + CONFIG_SYS_CACHELINE_SIZE - 1) >>> >>> #define DMA_DECLARE_BUFFER(type, na

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-29 Thread Anton Staaf
On Mon, Aug 29, 2011 at 1:35 PM, Wolfgang Denk wrote: > Dear Anton Staaf, > > In message > you > wrote: >> >> I would like to know, mainly for my education, why you do not want >> alloca, but are OK with dynamic array sizing (as in the first solution >> above).  My understanding is that they pr

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-29 Thread Anton Staaf
On Mon, Aug 29, 2011 at 1:47 PM, Scott Wood wrote: > On 08/29/2011 03:12 PM, Anton Staaf wrote: >> 1) Mikes's macro >> >> #define DMA_ALIGN_SIZE(size) \ >>        (((size) + CONFIG_SYS_CACHELINE_SIZE - 1) >> >> #define DMA_DECLARE_BUFFER(type, name, size) \ >>        void __##name[DMA_ALIGN_SIZE(s

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-29 Thread Scott Wood
On 08/29/2011 03:12 PM, Anton Staaf wrote: > 1) Mikes's macro > > #define DMA_ALIGN_SIZE(size) \ >(((size) + CONFIG_SYS_CACHELINE_SIZE - 1) > > #define DMA_DECLARE_BUFFER(type, name, size) \ >void __##name[DMA_ALIGN_SIZE(size * sizeof(type))]; \ >type * name = __##name & ~

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-29 Thread Wolfgang Denk
Dear Anton Staaf, In message you wrote: > > I would like to know, mainly for my education, why you do not want > alloca, but are OK with dynamic array sizing (as in the first solution > above). My understanding is that they pretty much equate to the same > thing. What is it about alloca that i

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-29 Thread Anton Staaf
On Wed, Aug 24, 2011 at 1:13 PM, Anton Staaf wrote: > On Wed, Aug 24, 2011 at 12:18 PM, Lukasz Majewski > wrote: >> On Wed, 24 Aug 2011 11:25:42 -0700 >> Anton Staaf wrote: >> >>> On Wed, Aug 24, 2011 at 11:12 AM, Wolfgang Denk wrote: >>> > Dear Anton Staaf, >>> > >>> > In message >>> > >>> >

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-24 Thread Anton Staaf
On Wed, Aug 24, 2011 at 12:18 PM, Lukasz Majewski wrote: > On Wed, 24 Aug 2011 11:25:42 -0700 > Anton Staaf wrote: > >> On Wed, Aug 24, 2011 at 11:12 AM, Wolfgang Denk wrote: >> > Dear Anton Staaf, >> > >> > In message >> > >> > you wrote: >> >> >> >> >> 4. get_dcache_line_size() can be simply

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-24 Thread Anton Staaf
On Wed, Aug 24, 2011 at 12:04 PM, Wolfgang Denk wrote: > Dear Anton Staaf, > > In message > you > wrote: >> >> > No, it is definitely NOT needed for this purpose - we have been using >> > CONFIG_SYS_CACHE_LINE_SIZE for more than a decade without problems, so >> > I don't really understand why w

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-24 Thread Lukasz Majewski
On Wed, 24 Aug 2011 11:25:42 -0700 Anton Staaf wrote: > On Wed, Aug 24, 2011 at 11:12 AM, Wolfgang Denk wrote: > > Dear Anton Staaf, > > > > In message > > > > you wrote: > >> > >> >> 4. get_dcache_line_size() can be simply defined as > >> >> #define get_dcache_line_size() CONFIG_SYS_CACHE_LINE

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-24 Thread Wolfgang Denk
Dear Anton Staaf, In message you wrote: > > > No, it is definitely NOT needed for this purpose - we have been using > > CONFIG_SYS_CACHE_LINE_SIZE for more than a decade without problems, so > > I don't really understand why we now would need a new function for > > this? > > Ahh, I misunderstoo

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-24 Thread Anton Staaf
On Wed, Aug 24, 2011 at 11:12 AM, Wolfgang Denk wrote: > Dear Anton Staaf, > > In message > you > wrote: >> >> >> 4. get_dcache_line_size() can be simply defined as >> >> #define get_dcache_line_size() CONFIG_SYS_CACHE_LINE_SIZE if we >> >> _really_ want to save a few bytes. >> > >> > Actually

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-24 Thread Wolfgang Denk
Dear Anton Staaf, In message you wrote: > > >> 4. get_dcache_line_size() can be simply defined as > >> #define get_dcache_line_size() CONFIG_SYS_CACHE_LINE_SIZE if we > >> _really_ want to save a few bytes. > > > > Actually I fail to understand why we would ever need > > get_dcache_line_size() i

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-24 Thread Mike Frysinger
On Wednesday, August 24, 2011 13:27:05 Anton Staaf wrote: > On Wed, Aug 24, 2011 at 6:25 AM, Wolfgang Denk wrote: > > Lukasz Majewski wrote: > >> 4. get_dcache_line_size() can be simply defined as > >> #define get_dcache_line_size() CONFIG_SYS_CACHE_LINE_SIZE if we > >> _really_ want to save a few

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-24 Thread Anton Staaf
On Wed, Aug 24, 2011 at 6:25 AM, Wolfgang Denk wrote: > Dear Lukasz Majewski, > > In message <20110824120744.097ba2c5@lmajewski.digital.local> you wrote: >> >> After reading dcache related threads I'd like to sum them up: >> >> 1. alloca() -> not acceptable to u-boot mainline by Wolfgang. I agree

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-24 Thread Mike Frysinger
On Wednesday, August 24, 2011 09:25:53 Wolfgang Denk wrote: > Lukasz Majewski wrote: > > 3. Mike's DMA_DECLARE_BUFFER(, , > > ) > > solution looks OK for me, at least for the stack allocated data (e.g. > > ext_csd). > > However this proposed implementation has been NAK'ed by Wolfgang. > > > > I'm

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-24 Thread Mike Frysinger
On Tuesday, August 23, 2011 17:48:50 Anton Staaf wrote: > I wasn't going to say it. :) How about something like this, which is > very similar to what you had Mike, but doesn't define the array in the > macro. It's a bit clearer what is going on, but also requires a bit > more work at each use. >

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-24 Thread Lukasz Majewski
Hi Wolfgang, > I think I'd like to see a macro that can be used like this: > > void *dma_buffer_pointer = DMA_BUFFER(size_in_bytes); > Frankly speaking I don't know any easy way to define buffer this way in a macro (at least without digging deep enough to C preprocessor programming trick

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-24 Thread Wolfgang Denk
Dear Lukasz Majewski, In message <20110824120744.097ba2c5@lmajewski.digital.local> you wrote: > > After reading dcache related threads I'd like to sum them up: > > 1. alloca() -> not acceptable to u-boot mainline by Wolfgang. I agree > that alloca is NOT the way to go. > > 2. malloc/memalign ->

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-24 Thread Lukasz Majewski
Hi, On Tue, 23 Aug 2011 23:00:59 -0400 Mike Frysinger wrote: > On Tuesday, August 23, 2011 18:42:46 Wolfgang Denk wrote: > > Mike Frysinger wrote: > > > > Why cannot we define a macro that declares a (sufficiently > > > > sized) buffer on the stack and provides and a pointer to a > > > > (correc

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Mike Frysinger
On Tuesday, August 23, 2011 18:42:46 Wolfgang Denk wrote: > Mike Frysinger wrote: > > > Why cannot we define a macro that declares a (sufficiently sized) > > > buffer on the stack and provides and a pointer to a (correctly > > > aligned) address in this buffer? > > > > isnt that what i already pos

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Wolfgang Denk
Dear Mike Frysinger, In message <201108231732.39791.vap...@gentoo.org> you wrote: > > > Why cannot we define a macro that declares a (sufficiently sized) > > buffer on the stack and provides and a pointer to a (correctly > > aligned) address in this buffer? > > isnt that what i already posted and

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Anton Staaf
On Tue, Aug 23, 2011 at 2:32 PM, Mike Frysinger wrote: > On Tuesday, August 23, 2011 17:09:37 Wolfgang Denk wrote: >> Mike Frysinger wrote: >> > On Tuesday, August 23, 2011 16:27:26 Anton Staaf wrote: >> > > So then, to guide our efforts, what is a more suitable solution? >> > > Would you prefer w

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Mike Frysinger
On Tuesday, August 23, 2011 17:09:37 Wolfgang Denk wrote: > Mike Frysinger wrote: > > On Tuesday, August 23, 2011 16:27:26 Anton Staaf wrote: > > > So then, to guide our efforts, what is a more suitable solution? > > > Would you prefer we stick with the existing path of calling memalign > > > and p

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Mike Frysinger
On Tuesday, August 23, 2011 17:06:41 Anton Staaf wrote: > On Tue, Aug 23, 2011 at 1:37 PM, Mike Frysinger wrote: > > On Tuesday, August 23, 2011 16:27:26 Anton Staaf wrote: > >> So then, to guide our efforts, what is a more suitable solution? > >> Would you prefer we stick with the existing path o

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Wolfgang Denk
Dear Mike Frysinger, In message <201108231637.05845.vap...@gentoo.org> you wrote: > > On Tuesday, August 23, 2011 16:27:26 Anton Staaf wrote: > > So then, to guide our efforts, what is a more suitable solution? > > Would you prefer we stick with the existing path of calling memalign > > and passin

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Anton Staaf
On Tue, Aug 23, 2011 at 1:37 PM, Mike Frysinger wrote: > On Tuesday, August 23, 2011 16:27:26 Anton Staaf wrote: >> So then, to guide our efforts, what is a more suitable solution? >> Would you prefer we stick with the existing path of calling memalign >> and passing it the cache size by directly

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Mike Frysinger
On Tuesday, August 23, 2011 16:27:26 Anton Staaf wrote: > So then, to guide our efforts, what is a more suitable solution? > Would you prefer we stick with the existing path of calling memalign > and passing it the cache size by directly calling > get_dcache_line_size? Or would you prefer somethin

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Mike Frysinger
On Tuesday, August 23, 2011 16:12:03 Wolfgang Denk wrote: > Anton Staaf wrote: > > > what about adding a new func like: > > > #define dma_buffer_alloca(size) > > > > I generally avoid large allocations on the stack, they can confuse > > virtual stack management and blow out small embedded stacks.

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Anton Staaf
On Tue, Aug 23, 2011 at 1:12 PM, Wolfgang Denk wrote: > Dear Anton Staaf, > > In message > you > wrote: >> >> > what about adding a new func like: >> > #define dma_buffer_alloca(size) >> >> I generally avoid large allocations on the stack, they can confuse >> virtual stack management and blow o

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Wolfgang Denk
Dear Anton Staaf, In message you wrote: > > > what about adding a new func like: > > #define dma_buffer_alloca(size) > > I generally avoid large allocations on the stack, they can confuse > virtual stack management and blow out small embedded stacks. But > neither of these are really a problem

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Anton Staaf
On Tue, Aug 23, 2011 at 11:36 AM, Mike Frysinger wrote: > On Tuesday, August 23, 2011 14:12:09 Anton Staaf wrote: >> On Tue, Aug 23, 2011 at 10:30 AM, Mike Frysinger wrote: >> > what about adding a new func like: >> > #define dma_buffer_alloca(size) >> >> I generally avoid large allocations on the

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Mike Frysinger
On Tuesday, August 23, 2011 14:12:09 Anton Staaf wrote: > On Tue, Aug 23, 2011 at 10:30 AM, Mike Frysinger wrote: > > what about adding a new func like: > > #define dma_buffer_alloca(size) > > I generally avoid large allocations on the stack, they can confuse > virtual stack management and blow ou

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Mike Frysinger
On Tuesday, August 23, 2011 14:12:09 Anton Staaf wrote: > On Tue, Aug 23, 2011 at 10:30 AM, Mike Frysinger wrote: > > On Tuesday, August 23, 2011 05:19:39 Lukasz Majewski wrote: > >> On Mon, 22 Aug 2011 11:57:57 -0700 Anton Staaf wrote: > >> > drivers/mmc/mmc.c: ext_csd in mmc_change_freq is alloca

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Anton Staaf
On Tue, Aug 23, 2011 at 10:30 AM, Mike Frysinger wrote: > On Tuesday, August 23, 2011 05:19:39 Lukasz Majewski wrote: >> On Mon, 22 Aug 2011 11:57:57 -0700 Anton Staaf wrote: >> > drivers/mmc/mmc.c: ext_csd in mmc_change_freq is allocated on the stac >> > drivers/mmc/mmc.c: scr and switch_status i

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Mike Frysinger
On Tuesday, August 23, 2011 05:19:39 Lukasz Majewski wrote: > On Mon, 22 Aug 2011 11:57:57 -0700 Anton Staaf wrote: > > drivers/mmc/mmc.c: ext_csd in mmc_change_freq is allocated on the stac > > drivers/mmc/mmc.c: scr and switch_status in sd_change_freq are > > allocated on the stack. > > drivers/m

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Anton Staaf
On Tue, Aug 23, 2011 at 2:19 AM, Lukasz Majewski wrote: > Hi Anton, > > On Mon, 22 Aug 2011 11:57:57 -0700 > Anton Staaf wrote: > >> drivers/mmc/mmc.c: ext_csd in mmc_change_freq is allocated on the stac >> drivers/mmc/mmc.c: scr and switch_status in sd_change_freq are >> allocated on the stack.

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Lukasz Majewski
Hi Anton, On Mon, 22 Aug 2011 11:57:57 -0700 Anton Staaf wrote: > drivers/mmc/mmc.c: ext_csd in mmc_change_freq is allocated on the stac > drivers/mmc/mmc.c: scr and switch_status in sd_change_freq are > allocated on the stack. > drivers/mmc/mmc.c: ext_csd in mmc_startup is allocated on the stac

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-23 Thread Lukasz Majewski
Hi Mike, On Mon, 22 Aug 2011 12:08:42 -0400 Mike Frysinger wrote: > On Monday, August 22, 2011 03:29:52 Lukasz Majewski wrote: > > On Fri, 19 Aug 2011 11:35:50 -0400 Mike Frysinger wrote: > > > On Friday, August 19, 2011 11:28:18 Lukasz Majewski wrote: > > > > On Fri, 19 Aug 2011 09:57:10 -0400

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-22 Thread Anton Staaf
On Mon, Aug 22, 2011 at 11:31 AM, Mike Frysinger wrote: > On Monday, August 22, 2011 14:15:22 Anton Staaf wrote: > > please dont top post Sorry about that. >> Yes, this would be a much preferable approach.  The only problem that >> I encountered when attempting to do that in the Chromium U-Boot

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-22 Thread Mike Frysinger
On Monday, August 22, 2011 14:15:22 Anton Staaf wrote: please dont top post > Yes, this would be a much preferable approach. The only problem that > I encountered when attempting to do that in the Chromium U-Boot was > that there are exposed stand alone U-Boot API's that can pass in > pointers t

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-22 Thread Anton Staaf
Yes, this would be a much preferable approach. The only problem that I encountered when attempting to do that in the Chromium U-Boot was that there are exposed stand alone U-Boot API's that can pass in pointers that make their way all the way down to the device driver. Two solutions occurred to me

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-22 Thread Mike Frysinger
On Monday, August 22, 2011 12:42:06 Anton Staaf wrote: > On Mon, Aug 22, 2011 at 9:08 AM, Mike Frysinger wrote: > > On Monday, August 22, 2011 03:29:52 Lukasz Majewski wrote: > >> No tests performed yet. The goal of those patches is to preserve the > >> MMC subsystem functionality when dcache is e

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-22 Thread Marek Vasut
On Monday, August 22, 2011 06:42:06 PM Anton Staaf wrote: > On Mon, Aug 22, 2011 at 9:08 AM, Mike Frysinger wrote: > > On Monday, August 22, 2011 03:29:52 Lukasz Majewski wrote: > >> On Fri, 19 Aug 2011 11:35:50 -0400 Mike Frysinger wrote: > >> > On Friday, August 19, 2011 11:28:18 Lukasz Majewski

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-22 Thread Anton Staaf
On Mon, Aug 22, 2011 at 9:08 AM, Mike Frysinger wrote: > On Monday, August 22, 2011 03:29:52 Lukasz Majewski wrote: >> On Fri, 19 Aug 2011 11:35:50 -0400 Mike Frysinger wrote: >> > On Friday, August 19, 2011 11:28:18 Lukasz Majewski wrote: >> > > On Fri, 19 Aug 2011 09:57:10 -0400 Mike Frysinger w

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-22 Thread Mike Frysinger
On Monday, August 22, 2011 03:29:52 Lukasz Majewski wrote: > On Fri, 19 Aug 2011 11:35:50 -0400 Mike Frysinger wrote: > > On Friday, August 19, 2011 11:28:18 Lukasz Majewski wrote: > > > On Fri, 19 Aug 2011 09:57:10 -0400 Mike Frysinger wrote: > > > > On Friday, August 19, 2011 05:25:13 Lukasz Maje

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-22 Thread Lukasz Majewski
Hi Mike, On Fri, 19 Aug 2011 11:35:50 -0400 Mike Frysinger wrote: > On Friday, August 19, 2011 11:28:18 Lukasz Majewski wrote: > > On Fri, 19 Aug 2011 09:57:10 -0400 Mike Frysinger wrote: > > > On Friday, August 19, 2011 05:25:13 Lukasz Majewski wrote: > > > > + cache_align_buf = memalign(

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-19 Thread Mike Frysinger
On Friday, August 19, 2011 11:28:18 Lukasz Majewski wrote: > On Fri, 19 Aug 2011 09:57:10 -0400 Mike Frysinger wrote: > > On Friday, August 19, 2011 05:25:13 Lukasz Majewski wrote: > > > + cache_align_buf = memalign(get_dcache_line_size(), > > > > nowhere do i see get_dcache_line_size() defined >

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-19 Thread Lukasz Majewski
Hi Mike, On Fri, 19 Aug 2011 09:57:10 -0400 Mike Frysinger wrote: > On Friday, August 19, 2011 05:25:13 Lukasz Majewski wrote: > > + cache_align_buf = memalign(get_dcache_line_size(), > > nowhere do i see get_dcache_line_size() defined > > also, what is the code size increase with your patch

Re: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-19 Thread Mike Frysinger
On Friday, August 19, 2011 05:25:13 Lukasz Majewski wrote: > + cache_align_buf = memalign(get_dcache_line_size(), nowhere do i see get_dcache_line_size() defined also, what is the code size increase with your patch ? -mike signature.asc Description: This is a digitally signed message part.

[U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers

2011-08-19 Thread Lukasz Majewski
MMC operations are performed on cache line size aligned buffers. In the current MMC implementation it is allowed to pass buffer with arbitrary alignment. In this patch assumption has been made, that it is better to align the buffer on the MMC framework boundary, than in a number of u-boot subsyste