Re: [U-Boot-Users] AT91RM9200 Errata (Was: CSB637 support - big bug..)

"Patrick .." oc3an@gmx.net schreibt:
I applied your patches to the 1.1.3 version of U-Boot - they all apply fine except for the main csb637 patch, which complains about patching a Makefile and MAKEALL.
Hi, that's probably due to other boards having been added in the meantime.
This is not the main problem however,
In the AT91RM9200 initialisation code, PMC_MCKR is written incorrectly. This register *MUST* be written in two separate steps (see the errata sheet for the AT91RM9200 for more details).
You're referring to Errata #28, right? Reading the text it seems you're right; however, this is not special to the CSB637 board - the code in question (cpu/arm920t/at91rm9200/lowlevel_init.S) was _not_ touched by my patch.
In my case i write 0x201, followed by 0x202.
OK, please provide a patch to lowlevel_init.S then.
Also, it is safe to use a divisor of 3 for the Master Clock, this gives 61.44MHz from a core of 184.32Mhz which is fine for the CSB637 (master clock limit is 80MHz), users should see a decent improvement in performance by doing this as it will increase the SDRAM bandwidth by a substantial amount.
Well, I got the clock values from linux 2.6.12 board-csb637.c; does Linux still boot correctly with your change?
Cheers Anders
CC'ed to the list, since this is relevant to ALL at91rm9200 users

Patrick,
This is not the main problem however,
In the AT91RM9200 initialisation code, PMC_MCKR is written incorrectly. This register *MUST* be written in two separate steps (see the errata sheet for the AT91RM9200 for more details). In my case i write 0x201, followed by 0x202.
How did you do that? Do you wait some time between the first and the second write?
-- Steven

--- Ursprüngliche Nachricht --- Von: Steven Scholz steven.scholz@imc-berlin.de An: Anders Larsen alarsen@rea.de Kopie: "Patrick .." oc3an@gmx.net, u-boot-users@lists.sourceforge.net Betreff: Re: [U-Boot-Users] AT91RM9200 Errata (Was: CSB637 support - big bug..) Datum: Wed, 24 Aug 2005 11:01:30 +0200
Patrick,
This is not the main problem however,
In the AT91RM9200 initialisation code, PMC_MCKR is written incorrectly. This register *MUST* be written in two separate steps (see the errata sheet for the AT91RM9200 for more details). In my case i write 0x201, followed by 0x202.
How did you do that? Do you wait some time between the first and the second write?
-- Steven
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
No need to wait between the writes.
This fix is quite simple to implement. in lowlevel_init.S edit the values for MCKR (as shown below). You also need to modify the length of the assembly loop some lines above which iterates through this list (also shown below). This length should really be calculated (but it works).
Then define MCKR_VAL0 as the first value to be written and MCKR_VAL1 as the second in the includes/common/csb637.h file.
Hope this helps,
-Patrick
SMRDATA: .word MC_PUIA .word MC_PUIA_VAL .word MC_PUP .word MC_PUP_VAL .word MC_PUER .word MC_PUER_VAL .word MC_ASR .word MC_ASR_VAL .word MC_AASR .word MC_AASR_VAL .word EBI_CFGR .word EBI_CFGR_VAL .word SMC2_CSR .word SMC2_CSR_VAL .word PLLAR .word PLLAR_VAL .word PLLBR .word PLLBR_VAL .word MCKR // Edited by Patrick .word MCKR_VAL0 // Edited by Patrick .word MCKR // Edited by Patrick .word MCKR_VAL1 // Edited by Patrick /* SMRDATA is 88 bytes long */ /* here there's a delay of 100 */
/* memory control configuration */ /* this isn't very elegant, but what the heck */ ldr r0, =SMRDATA ldr r1, _MTEXT_BASE sub r0, r0, r1 add r2, r0, #88 // Edited by Patrick

Patrick,
.. wrote:
--- Ursprüngliche Nachricht --- Von: Steven Scholz steven.scholz@imc-berlin.de An: Anders Larsen alarsen@rea.de Kopie: "Patrick .." oc3an@gmx.net, u-boot-users@lists.sourceforge.net Betreff: Re: [U-Boot-Users] AT91RM9200 Errata (Was: CSB637 support - big bug..) Datum: Wed, 24 Aug 2005 11:01:30 +0200
No need to sent the above text!
[snip]
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
No need to sent the above text!
[snip]
No need to wait between the writes.
Due to all the rubbish text above I forget the question... ;-)
This fix is quite simple to implement. in lowlevel_init.S edit the values for MCKR (as shown below). You also need to modify the length of the assembly loop some lines above which iterates through this list (also shown below). This length should really be calculated (but it works).
Thanks a million.
Then define MCKR_VAL0 as the first value to be written and MCKR_VAL1 as the second in the includes/common/csb637.h file.
Hope this helps,
Sure. Maybe you could send unified diffs next time as they're much easier to read.
Thanks anyway!
/* memory control configuration */ /* this isn't very elegant, but what the heck */ ldr r0, =SMRDATA ldr r1, _MTEXT_BASE sub r0, r0, r1 add r2, r0, #88 // Edited by Patrick
Aah. I forgot that. Cause I thought the original autjort would never do a bad thing like hardcoding such a loop count ... ;-)
-- Steven

Steven Scholz steven.scholz@imc-berlin.de schreibt:
Then define MCKR_VAL0 as the first value to be written and MCKR_VAL1 as
the
second in the includes/common/csb637.h file.
Hope this helps,
Sure. Maybe you could send unified diffs next time as they're much easier to read.
And please bear in mind that an increasing number of boards use this code and must be modified accordingly.
Cheers Anders
participants (3)
-
Anders Larsen
-
Patrick ..
-
Steven Scholz