[U-Boot-Users] Wrong CFG_BSTOPRE encoding in cpu/mpc824x/cpu_init.c

Peter Hanson peterh at google.com
Wed Sep 14 15:51:51 CEST 2005

I'm trying to define CFG_BSTOPRE = 121, or about 1/8 of nominal
REFINT.  But when I read MCCR1-4 back with the BDI2000, the value
looks like 604, not 121.

The encoding of BSTOPRE is complex.  It is split into 3 subfields, and
spread over MCCR2 and MCCR4.  The discrepency seems to be due to
different assumptions about how the subfields are ordered in the
composite value.

The code in cpu/mpc824x/cpu_init.c extracts the pieces as
  ( BSTOPRE[6-9] || BSTOPRE[2-5] || BSTOPRE[0-1] )

Per Freescale technical support, these three fields are to be assembled as
  ( BSTOPRE[0-1] || BSTOPRE[2-5] || BSTOPRE[6-9] )

The  Sandpoint 8240 configuration file confirms this view

  Peter Hanson

More information about the U-Boot mailing list