at91rm9200: fix broken boot from nor flash
PATCH 1/1 at91rm9200: fix broken boot from nor flash
This patch fix the broken boot from NOR Flash on AT91RM9200 boards, if CONFIG_AT91RM9200 is defined and nor preloader is used.
Please see <http://lists.denx.de/pipermail/u-boot/2008-November/043078.html>
<http://lists.denx.de/pipermail/u-boot/2008-November/043093.html>
for reason
---
cpu/arm920t/start.S +1 -4
@@ -24,7 +24,6 @@ * MA 02111-1307 USA */ - #include <config.h> #include <version.h> #include <status_led.h>
@@ -178,8 +177,6 @@ copyex: bl cpu_init_crit #endif -#ifndef CONFIG_AT91RM9200 - #ifndef CONFIG_SKIP_RELOCATE_UBOOT relocate: /* relocate U-Boot to RAM */ adr r0, _start /* r0 <- current position of code */
@@ -198,7 +195,7 @@ copy_loop: cmp r0, r2 /* until source end addreee [r2] */ ble copy_loop #endif /* CONFIG_SKIP_RELOCATE_UBOOT */ -#endif + /* Set up the stack */ stack_setup: ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */
include/configs/at91rm9200dk.h +2 -0
@@ -72,6 +72,8 @@#define SDRC_MR_VAL2 0x00000003/* Load Mode Register */ #define SDRC_MR_VAL3 0x00000000/* Normal Mode */ #define SDRC_TR_VAL 0x000002E0/* Write refresh rate */ +#else +#define CONFIG_SKIP_RELOCATE_UBOOT #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ /* * Size of malloc() pool
include/configs/cmc_pu2.h +2 -0
@@ -71,6 +71,8 @@#define SDRC_MR_VAL2 0x00000003/* Load Mode Register */ #define SDRC_MR_VAL3 0x00000000/* Normal Mode */ #define SDRC_TR_VAL 0x000002E0/* Write refresh rate */ +#else +#define CONFIG_SKIP_RELOCATE_UBOOT #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ /*
include/configs/csb637.h +2 -0
@@ -72,6 +72,8 @@#define SDRC_MR_VAL2 0x00000003/* Load Mode Register */ #define SDRC_MR_VAL3 0x00000000/* Normal Mode */ #define SDRC_TR_VAL 0x000002E0/* Write refresh rate */ +#else +#define CONFIG_SKIP_RELOCATE_UBOOT #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ /* * Size of malloc() pool
include/configs/kb9202.h +2 -0
@@ -51,6 +51,8 @@#define CONFIG_INITRD_TAG 1#define CONFIG_SKIP_LOWLEVEL_INIT +#define CONFIG_SKIP_RELOCATE_UBOOT /* undef this for direct boot from */ +/* NOR flash without preloader */ #define CONFIG_SYS_LONGHELP
include/configs/mp2usb.h +2 -0
@@ -76,6 +76,8 @@#define SDRC_MR_VAL2 0x00000003/* Load Mode Register */ #define SDRC_MR_VAL3 0x00000000/* Normal Mode */ #define SDRC_TR_VAL 0x000002E0/* Write refresh rate */ +#else +#define CONFIG_SKIP_RELOCATE_UBOOT #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ /*
PATCH 1/1 at91rm9200: fix broken boot from nor flash
Quoted 9 lines · Jens Scharsig
This patch fix the broken boot from NOR Flash on AT91RM9200 boards, if
CONFIG_AT91RM9200is defined and nor preloader is used.Please see <http://lists.denx.de/pipermail/u-boot/2008-November/043078.html>
<http://lists.denx.de/pipermail/u-boot/2008-November/043093.html>
for reasonSigned-off-by Jens Scharsig <[email protected]>---
Wolfgang could you test on the cmc_pu2 and the DK?
Best Regards,
J.
PATCH 1/1 at91rm9200: fix broken boot from nor flash
In reply to Jens ScharsigDear Jens,
Quoted 6 lines · In message <[email protected]> you wrote:
This patch fix the broken boot from NOR Flash on AT91RM9200 boards, if
CONFIG_AT91RM9200is defined and nor preloader is used.Please see <http://lists.denx.de/pipermail/u-boot/2008-November/043078.html>
<http://lists.denx.de/pipermail/u-boot/2008-November/043093.html>
for reason
I testedm the patch, but it doesn't fix the problem on the AT91RM9200DK board (that's the one I could easily test at the
moment).
I bisected the problem, and for me culprit seems to be commit ID d4fc6012fd0a5c211b825691f44b06f8032c0551
Bisecting is a bit difficult,m because close to the end there is a non-compiling version; these are the last few steps:
...f01dbb5424a81453c81190dd30e945891466f621 bad 71d67f43dabe8dd8adbe594b6c61944a2d106efa good 65d7ada64557e76094b4fd3bad30a0f18f5fb2b2 doesn't build; seems bad dcbfd2e5649f97aa04fbbc6ea2b008aa4486e225 bad
=>
commit d4fc6012fd0a5c211b825691f44b06f8032c0551
Author: Peter Pearse <[email protected]> Date: Tue Aug 14 10:10:52 2007 +0100
Add MACH_TYPE records for several AT91 boards.
Merge to two at45.c files into a common file, split to at45.c and spi.c Fix spelling error in DM9161 PHY Support.
Initialize at91rm9200 board (and set LED).
Add PIO control for at91rm9200dk LEDs and Mux.
Change dataflash partition boundaries to be compatible with Linux 2.6.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Build a system that even a fool can use and only a fool will want to use it.
PATCH 1/1 at91rm9200: fix broken boot from nor flash
Dear Wolfgang,
Hello at all,
Quoted 5 lines
I testedm the patch, but it doesn't fix the problem on the AT91RM9200DK board (that's the one I could easily test at themoment).
I think my patch only don't work on AT91RM9200DK, AT91RM9200EK or AT91RM9200DF board. Blame it on this solution is the #ifdef construct in /cpu/arm920t/start.s at line 264. There are no low_level_init run for DK, EK andDF board.
It's only effect on Atmel Boards. I can't test is it truth. So the question goes to DK users and arm custodian.
Best regards
Jens Scharsig
PATCH 1/1 at91rm9200: fix broken boot from nor flash
Dear Jens Scharsig,
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 4 lines
I testedm the patch, but it doesn't fix the problem on the AT91RM9200DK board (that's the one I could easily test at themoment).
I think my patch only don't work on AT91RM9200DK, AT91RM9200EK or AT91RM9200DF board. Blame it on this solution is the #ifdef construct in /cpu/arm920t/start.s at line 264. There are no
low_level_initrun for DK, EK andDF board.
I agree. That code looks pretty bogus to me, too.
I can confirm that removing the "defined(CONFIG_AT91RM9200DK) ||" part there makes the code work on the AT91RM9200DK board (j24: patch following ASAP).
Any AT91RM9200EK and AT91RM9200DF users out there to test this?
Quoted 2 lines
It's only effect on Atmel Boards. I can't test is it truth. So the question goes to DK users and arm custodian.
For DK, the situation looks clear now.
Thanks for the patch!
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Ja, mach' nur einen Plan, sei nur ein grosses Licht
und mach' dann noch 'nen zweiten Plan, geh'n tun sie beide nicht."
-- Bert Brecht, DreigroschenoperPATCH 1/1 at91rm9200: fix broken boot from nor flash
Wolkgang Denk sez,
Quoted 9 lines
Jens Scharsig claims,
Quoted 5 lines
I think my patch only don't work on AT91RM9200DK, AT91RM9200EK or AT91RM9200DF board. Blame it on this solution is the #ifdef construct in /cpu/arm920t/start.s at line 264. There are no
low_level_initrun for DK, EK andDF board.I agree. That code looks pretty bogus to me, too.
I've had the problem where trying to run u-boot directly from rom fails, and read various bits about the defines in start.s being goofed.
Quoted 6 lines
I can confirm that removing the "
defined(CONFIG_AT91RM9200DK)||" part there makes the code work on the AT91RM9200DK board (j24:
patch following ASAP).Any AT91RM9200EK and AT91RM9200DF users out there to test this?
I'll be happy to do that, I have an AT91RM9200-EK board that I'm doing dev on right now. I assume that I can download the current tree and get the patched version?
Matt
---
Beating my head against the AT91RM9200 for too long.
PATCH 1/1 at91rm9200: fix broken boot from nor flash
In reply to Jens ScharsigQuoted 9 lines · Jens Scharsig
This patch fix the broken boot from NOR Flash on AT91RM9200 boards, if
CONFIG_AT91RM9200is defined and nor preloader is used.Please see <http://lists.denx.de/pipermail/u-boot/2008-November/043078.html>
<http://lists.denx.de/pipermail/u-boot/2008-November/043093.html>
for reasonSigned-off-by Jens Scharsig <[email protected]>---
apply to u-boot-at91
Best Regards,
J.