From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Wed, 24 Aug 2011 21:18:12 +0200 Subject: [U-Boot] [PATCH] mmc:dcache: Cache line size aligned internal MMC buffers In-Reply-To: References: <1313745913-28672-1-git-send-email-l.majewski@samsung.com> <201108231732.39791.vapier@gentoo.org> <20110823224246.7F11411F9E62@gemini.denx.de> <201108232301.01270.vapier@gentoo.org> <20110824120744.097ba2c5@lmajewski.digital.local> <20110824132553.A5F2C11F9E76@gemini.denx.de> <20110824181252.CAB9E11F9E76@gemini.denx.de> Message-ID: <20110824211812.1e9f039c@mig> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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_SIZE if we > >> >> _really_ want to save a few bytes. > >> > > >> > Actually I fail to understand why we would ever need > >> > get_dcache_line_size() in a boot loader. > >> > >> It is required so that we can correctly allocate buffers that will > >> be used by DMA engines to read or write data. ?The reason that > >> these > > > > 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? > Ok, so one problem solved :-). > Ahh, I misunderstood your question. I thought you were asking about > the need to know the cache line size. Not it's specific > implementation as a function call. In which case, I agree, and am > happy to use CONFIG_SYS_CACHE_LINE_SIZE, though I don't see any > definitions of CONFIG_SYS_CACHE_LINE_SIZE in the entire U-Boot tree. > What have I missed? > There are some similar definitions: ./include/configs/atstk1006.h:#define CONFIG_SYS_DCACHE_LINESZ 32 ./include/configs/atngw100.h:#define CONFIG_SYS_DCACHE_LINESZ 32 ./include/configs/favr-32-ezkit.h:#define CONFIG_SYS_DCACHE_LINESZ 32 > Thanks, > Anton > > > > > Best regards, > > > > Wolfgang Denk > > > > -- > > DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev > > Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 > > Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: > > (+49)-8142-66989-80 Email: wd at denx.de Brain: an apparatus with > > which we think we think. ? ?- Ambrose Bierce > > > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot Regards, Lukasz Majewski