r4151 - trunk/src/target/u-boot/patches
werner at sita.openmoko.org
werner at sita.openmoko.org
Mon Mar 3 17:06:58 CET 2008
Author: werner
Date: 2008-03-03 17:06:55 +0100 (Mon, 03 Mar 2008)
New Revision: 4151
Added:
trunk/src/target/u-boot/patches/nor-irqvec.patch
Modified:
trunk/src/target/u-boot/patches/series
Log:
If we boot from NOR, the exception vectors are provided by the NOR as well.
Once the AUX button is released, SteppingStone appears at address 0, giving
us invalid exception vectors. Thus, any subsequent interrupt would crash
the system. This patch makes u-boot wait until AUX is released, copies the
exception vectors into SteppingStone, and only then proceeds to enable
interrupts.
nor-irqvec.patch:
- board/neo1973/gta02/gta02.c (board_late_init): moved "extern"s to global
scope, since they're now also used by board_init
- board/neo1973/gta02/gta02.c (board_init): if booting from NOR, wait until the
AUX button is released
Added: trunk/src/target/u-boot/patches/nor-irqvec.patch
===================================================================
--- trunk/src/target/u-boot/patches/nor-irqvec.patch 2008-03-03 15:14:03 UTC (rev 4150)
+++ trunk/src/target/u-boot/patches/nor-irqvec.patch 2008-03-03 16:06:55 UTC (rev 4151)
@@ -0,0 +1,40 @@
+Index: u-boot/board/neo1973/gta02/gta02.c
+===================================================================
+--- u-boot.orig/board/neo1973/gta02/gta02.c
++++ u-boot/board/neo1973/gta02/gta02.c
+@@ -63,6 +63,8 @@ DECLARE_GLOBAL_DATA_PTR;
+ #endif
+
+ unsigned int neo1973_wakeup_cause;
++extern unsigned char booted_from_nand;
++extern unsigned char booted_from_nor;
+ extern int nobootdelay;
+
+ static inline void delay (unsigned long loops)
+@@ -211,14 +213,23 @@ int board_init(void)
+ icache_enable();
+ dcache_enable();
+
++ /*
++ * Since the NOR is replaced by SteppingStone when the AUX button is
++ * released, we have to wait for this and copy our exception vectors
++ * before we can let u-boot enable interrupts.
++ */
++ if (booted_from_nor) {
++ extern char _start;
++
++ while (neo1973_aux_key_pressed());
++ memcpy((void *) 0, &_start, 0x40);
++ }
++
+ return 0;
+ }
+
+ int board_late_init(void)
+ {
+- extern unsigned char booted_from_nand;
+- extern unsigned char booted_from_nor;
+-
+ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
+ unsigned char tmp;
+ char buf[32];
Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series 2008-03-03 15:14:03 UTC (rev 4150)
+++ trunk/src/target/u-boot/patches/series 2008-03-03 16:06:55 UTC (rev 4151)
@@ -74,6 +74,7 @@
gta02-bootmenu.patch
gta02-nor.patch
nor-bootmenu.patch
+nor-irqvec.patch
glamo-mmc.patch
glamo-regs.patch
More information about the commitlog
mailing list