From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Tue, 01 Mar 2011 14:36:09 +0100 Subject: [U-Boot] [PATCH 2/8] armv7: cache maintenance operations for armv7 In-Reply-To: <4D6CDE88.2040207@ti.com> References: <1293018898-13253-1-git-send-email-aneesh@ti.com> <1293018898-13253-3-git-send-email-aneesh@ti.com> <4D2805FC.7070200@free.fr> <4D6CDE88.2040207@ti.com> Message-ID: <4D6CF649.30403@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le 01/03/2011 12:54, Aneesh V a ?crit : > Hi Albert, > > On Saturday 08 January 2011 12:06 PM, Albert ARIBAUD wrote: >> Hi Aneesh, > [snip ..] >>> +/* some utility macros */ >>> +#define mask(start, end) \ >>> + (((1<< ((end) - (start) + 1)) - 1)<< (start)) >>> + >>> +#define mask_n_get(reg, start, end) \ >>> + (((reg)& mask(start, end))>> (start)) >> >> Seeing as these functions are only used in the ARMv7 cache C file, they >> should be moved there. >> > > I am working on v2 of this series. > > We had aligned on moving these macros to omap specific headers. But I > now realize that I want to use them from cache_v7.c, so it can not be > in omap header. I have used them in other places too in my recent work > so it needs to be in a header file. I am putting these functions and > some other utils I need in a new file "arch/arm/include/asm/utils.h" > Is that fine? I need to look at the code that uses these macros again. I'll do that tonight. > Best regards, > Aneesh Amicalement, -- Albert.