public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [patch/rfc] rm9200 lowevel_init: don't touch reserved/readonly registers
Date: Sun, 28 Jun 2009 22:41:54 -0700	[thread overview]
Message-ID: <200906282241.54948.david-b@pacbell.net> (raw)
In-Reply-To: <200906091112.32589.david-b@pacbell.net>

On Tuesday 09 June 2009, David Brownell wrote:
> For some reason the AT91rm9200 lowlevel init writes to a bunch of
> reserved or read-only addresses.  All the boards seem to define the
> value-to-be-written values as zero ... but they shouldn't actually
> be writing *anything* there.

Repeat:  should not write to reserved or read-ony addresses.


> If there's a real need to write these locations, like an erratum
> that's not included in the current list, that should be reflected
> in a source code comment.  Looks like maybe some very early BDI-2000
> setup code has been carried along by cargo cult programming since
> at least late 2004 (per GIT history).
> 
> Meanwhile, here's a patch/RFC disabling what seems to be bogosity.
> If it's eventually a "go", the supporting code should be removed.

No comments?



> ---
>  cpu/arm920t/at91rm9200/lowlevel_init.S |   10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> --- a/cpu/arm920t/at91rm9200/lowlevel_init.S
> +++ b/cpu/arm920t/at91rm9200/lowlevel_init.S
> @@ -81,6 +81,7 @@ LoopOsc:
>  	bne	0b
>  	/* delay - this is all done by guess */
>  	ldr	r0, =0x00010000
> +	/* (vs reading PMC_SR for LOCKA, LOCKB ... or MOSCS earlier) */
>  1:
>  	subs	r0, r0, #1
>  	bhi	1b
> @@ -108,16 +109,22 @@ LoopOsc:
>  	.ltorg
>  
>  SMRDATA:
> +#if 0
> +/* MC_PU* are reserved "do not use" memory controller addresses;
> + * see table 16-1 of the rm9200 manual
> + */
>  	.word AT91C_MC_PUIA
>  	.word CONFIG_SYS_MC_PUIA_VAL
>  	.word AT91C_MC_PUP
>  	.word CONFIG_SYS_MC_PUP_VAL
>  	.word AT91C_MC_PUER
>  	.word CONFIG_SYS_MC_PUER_VAL
> +/* MC_ASR/AASR are read-only registers, see table 16-1 again */
>  	.word AT91C_MC_ASR
>  	.word CONFIG_SYS_MC_ASR_VAL
>  	.word AT91C_MC_AASR
>  	.word CONFIG_SYS_MC_AASR_VAL
> +#endif
>  	.word AT91C_EBI_CFGR
>  	.word CONFIG_SYS_EBI_CFGR_VAL
>  	.word AT91C_SMC_CSR0
> @@ -128,8 +135,7 @@ SMRDATA:
>  	.word CONFIG_SYS_PLLBR_VAL
>  	.word AT91C_MCKR
>  	.word CONFIG_SYS_MCKR_VAL
> -	/* SMRDATA is 80 bytes long */
> -	/* here there's a delay of 100 */
> +	/* here there's a delay */
>  SMRDATA1:
>  	.word AT91C_PIOC_ASR
>  	.word CONFIG_SYS_PIOC_ASR_VAL
> 

  reply	other threads:[~2009-06-29  5:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-09 18:12 [U-Boot] [patch/rfc] rm9200 lowevel_init: don't touch reserved/readonly registers David Brownell
2009-06-29  5:41 ` David Brownell [this message]
2009-07-10 20:49   ` Wolfgang Denk
2009-07-17  1:39     ` David Brownell

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=200906282241.54948.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --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