From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Andreas_Bie=DFmann?= Date: Mon, 13 Aug 2012 17:04:59 +0200 Subject: [U-Boot] [PATCH v3] Consolidate bootcount code into drivers/bootcount In-Reply-To: <50291476.5060404@denx.de> References: <1338878275-1918-1-git-send-email-sr@denx.de> <5028FD1A.5010608@gmail.com> <50290318.7080305@denx.de> <502905CA.8050708@gmail.com> <50291476.5060404@denx.de> Message-ID: <5029179B.6090807@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefan, On 13.08.2012 16:51, Stefan Roese wrote: > Hi Andreas, > > On 08/13/2012 03:48 PM, Andreas Bie?mann wrote: >>>>> +COBJS-y += bootcount.o >>>>> +COBJS-$(CONFIG_AT91SAM9XE) += bootcount_at91.o >>>> >>>> I tend to NAK this. Before it was available to all at91 processors (keep >>>> in mind nearly all at91 have this gpbr register). Now it is only >>>> available to AT91SAM9XE processor series which is the only user for >>>> bootcount in mainline. >>> >>> Then we should choose a different CONFIG_ option here. One that selects >>> all AT91 boards potentially supporting this feature. You are the expert >>> here, please make a suggestion. >> >> Unfortunately there is no such config option yet. We could add all the >> SoC explicitly like this: >> >> ---8<--- >> | +COBJS-$(CONFIG_AT91SAM9260) += bootcount_at91.o >> | +COBJS-$(CONFIG_AT91SAM9261) += bootcount_at91.o >> | +COBJS-$(CONFIG_AT91SAM9263) += bootcount_at91.o >> | +COBJS-$(CONFIG_AT91SAM9G10) += bootcount_at91.o >> | +COBJS-$(CONFIG_AT91SAM9G20) += bootcount_at91.o >> | +COBJS-$(CONFIG_AT91SAM9M10G45) += bootcount_at91.o >> | +COBJS-$(CONFIG_AT91SAM9RL) += bootcount_at91.o >> | COBJS-$(CONFIG_AT91SAM9XE) += bootcount_at91.o >> | +COBJS-$(CONFIG_AT91SAM9G20) += bootcount_at91.o >> --->8--- >> >> Maybe there is some make foo to get this easier? > > Maybe. But nothing I can think of quickly. The better solution would be > to add a new common CONFIG_AT91 (or similar) define, which is defined > for all at91 platforms. Might be helpful in other places as well. > > Not sure, how to best add this global AT91 define though. Easy wold be > to add it to config header files. I think we put it in the asm/arch/hardware.h files, something like CONFIG_AT91_GPBR. >>>> I fear we may break some not mainline boards >>>> here. >>> >>> Maybe. But we usually don't care about out-of-tree ports. >> >> That is true, we could just wait for patches adding this feature to >> other at91 SoC. >> >>>> I would prefer something that includes all different at91 SoC by >>>> default (except rm9200). >>>> >>>> I have no solution yet but send this to prevent a v4. Will send a >>>> proposal for at91 later this day. >>> >>> Okay. But I would really like to see this patch go in soon. I still have >>> a new board support patch waiting here for quite a long time depending >>> on this bootcount stuff. >> >> I'm with you, do you have a suggestion how to do the make foo nice? > > See above. Perhaps somebody else has other suggestions. > > Nevertheless I think we can postpone this "AT91 bootcount tuning" to a > follow-up patch. This is ok for me. Just realized there is a v4 on patchwork (but did not hit my MUA ...). Just add a Acked-by: Andreas Bie?mann to v4. Best regards Andreas Bie?mann