[U-Boot] [PATCH v2] Consolidate bootcount code into drivers/bootcount

Christian Riesch christian.riesch at omicron.at
Mon Jun 4 15:30:32 CEST 2012


Hi,

On Mon, Jun 4, 2012 at 3:14 PM, Stefan Roese <sr at denx.de> wrote:
> On Monday 04 June 2012 15:03:27 Rob Herring wrote:
>> On 06/04/2012 07:38 AM, Stefan Roese wrote:
>> > This patch moves all bootcount implementations into a common
>> > directory: drivers/bootcount. The generic bootcount driver
>> > is now usable not only by powerpc platforms, but others as well.
>> >
>> > Signed-off-by: Stefan Roese <sr at denx.de>
>> > Cc: Heiko Schocher <hs at denx.de>
>> > Cc: Valentin Longchamp <valentin.longchamp at keymile.com>
>> > Cc: Christian Riesch <christian.riesch at omicron.at>
>> > Cc: Manfred Rudigier <manfred.rudigier at omicron.at>
>> > Cc: Mike Frysinger <vapier at gentoo.org>
>> > Cc: Rob Herring <rob.herring at calxeda.com>
>> > Cc: Reinhard Meyer <reinhard.meyer at emk-elektronik.de>
>> > ---
>> > v2:
>> > - Added CONFIG_BOOTCOUNT_LE to bootcount_davinci.c and enabled it

Thanks a lot! I will test it on the calimain board.

>> >
>> >   in calimain.h to select little-endian accessors.
>>
>> highbank is also LE.
>
> Yes, sure. I could move those inline functions to a header, so that they can
> be used by the other "drivers" as well. Okay?
>

I don't think this is necessary. As long as a board uses its native
endianess to store the boot counter, nothing special is needed.
Regards,
Christian

>> Why don't you use __BYTE_ORDER rather than a new
>> define?
>
> Unfortunately not. There are LE platforms that use BE accessors for the
> bootcounter already (Davinci enbw_cmc). Mostly historical reasons I assume,
> since the original bootcount implementation was powerpc specific with those
> be32() functions.
>
> Thanks,
> Stefan
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot


More information about the U-Boot mailing list