[U-Boot] [PATCH 31/31] 83xx, kmeter1: added bootcount feature
Kim Phillips
kim.phillips at freescale.com
Thu Jan 29 17:28:14 CET 2009
On Thu, 29 Jan 2009 10:22:06 +0100
Heiko Schocher <hs at denx.de> wrote:
> Hello Kim,
>
> Kim Phillips wrote:
> > On Wed, 28 Jan 2009 10:41:02 +0100
> > Heiko Schocher <hs at denx.de> wrote:
> >
> >> diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c
> >
> >> +#ifdef CONFIG_BOOTCOUNT_LIMIT
> >> +
> >> +#if !defined(CONFIG_BOOTCOUNT_ADDR)
> >> +#define CONFIG_BOOTCOUNT_ADDR 0x11bff8
> >
> > it's CONFIG_SYS and magic number, but now that I've found it, sorry, I
> > can't accept this - not all 83xx have a QE and thus this MURAM. Even
>
> Hmm.. maybe we make this dependent on CONFIG_QE ?
still, the 8323 and 8360 would need different address values...so not
only CONFIG_QE.
> > if they did this would require changing the device tree muram node
> > property, to indicate its size has shrunk 8 bytes, right? In fact, not
>
> Yes, we should do this.
I hope the QE drivers don't significantly drop their performance given
a muram size is not a multiple of a power of 2.
> > all QE's have 48Kbytes of MURAM either - the 8323 only has 16Kbytes.
>
> Thats why you could define it with CONFIG_BOOTCOUNT_ADDR, where
> exactly this 8 bytes are.
it would be nice if all 83xx had the same address though.
> > Problem is, I don't know of a better place to put the
> > bootcount. Ideas?
>
> I thought to make it as on 82xx (using parameter Ram of SCC1), because
> UCC5 should be compatible to the SCC1 see 8360ERM.pdf Table 19-11 on
> page 19-20. But on the 8360, after reset, the complete parameter RAM is
> initialized with 0 ... so that didn't work. Other places I couldn't
> found for this feature :-(
you thinking is right, I just can't think of another place to put it -
and I suspect this isn't something that can be put in memory that lies
outside the IMMR.
if you really want this, make it only for the QE based chips, and
include the device tree modification. I still don't know if this
should be enabled by default in the configs, however - debugging QE
performance down to this change would be relatively hard to find.
Kim
More information about the U-Boot
mailing list