public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Reinhard Meyer <u-boot@emk-elektronik.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: Consolidate bootcount_{store|load}
Date: Tue, 14 Sep 2010 03:11:50 +0200	[thread overview]
Message-ID: <4C8ECBD6.3060004@emk-elektronik.de> (raw)
In-Reply-To: <1284406319-9032-1-git-send-email-agust@denx.de>

Dear Anatolij Gustschin,
> This patch consolidates bootcount_{store|load} for ARM by
> implementing a common version in arch/arm/lib/bootcount.c. This
> code is now used by all ARM variants that currently have these
> functions implemented.
>
> Also supports two different bootcount versions:
>
>      a) Use 2 separate words (2 * 32bit) to store the bootcounter
>      b) Use only 1 word (2 * 16bit) to store the bootcounter
>
> The latter was already used by AT91.

More specific: only AT91SAM9260. There are many more AT91 SoCs
that might want to use bootcount in the future!

The more I think about it, the less sense it makes to move
bootcount access to arm/lib:

Handling bootcount is very SoC (maybe even board, if the SoC has no
nonvolatile storage) and definitely not ARM specific.

Moving it from ARM-SoC specific files to a common ARM-lib file will
cause many conditional compiles there.

The arch/powerpc/lib/bootcount.c is an example how the arm/lib/bootcount.c
is going to look like in the long run.

Reinhard

PS: your bootcount.c misses the GPL header...

  parent reply	other threads:[~2010-09-14  1:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 19:31 [U-Boot] [PATCH] ARM: Consolidate bootcount_{store|load} Anatolij Gustschin
2010-09-14  0:33 ` Reinhard Meyer
2010-09-14  1:11 ` Reinhard Meyer [this message]
2010-09-14  9:42   ` Anatolij Gustschin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C8ECBD6.3060004@emk-elektronik.de \
    --to=u-boot@emk-elektronik.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox