r4150 - trunk/src/target/u-boot/patches

werner at sita.openmoko.org werner at sita.openmoko.org
Mon Mar 3 16:14:06 CET 2008


Author: werner
Date: 2008-03-03 16:14:03 +0100 (Mon, 03 Mar 2008)
New Revision: 4150

Added:
   trunk/src/target/u-boot/patches/nor-bootmenu.patch
Modified:
   trunk/src/target/u-boot/patches/series
Log:
This patch makes u-boot on GTA02 always enter the bootmenu when booting from
NOR. This de-complexifies interaction with the user and is actually also 
needed for correctly handling the exception vectors.

nor-bootmenu.patch:
- cpu/arm920t/start.S (booted_from_nor): set this flag if booting from NOR
- board/neo1973/gta02/gta02.c (board_late_init): always enter the boot menu if
  booting from NOR
- board/neo1973/gta02/gta02.c (board_late_init): used the opportunity to place
  the "extern"s at a more prominent location



Added: trunk/src/target/u-boot/patches/nor-bootmenu.patch
===================================================================
--- trunk/src/target/u-boot/patches/nor-bootmenu.patch	2008-03-03 14:58:04 UTC (rev 4149)
+++ trunk/src/target/u-boot/patches/nor-bootmenu.patch	2008-03-03 15:14:03 UTC (rev 4150)
@@ -0,0 +1,72 @@
+This patch makes u-boot on GTA02 always enter the bootmenu when booting from
+NOR. This de-complexifies interaction with the user and is actually also 
+needed for correctly handling the exception vectors.
+
+- cpu/arm920t/start.S (booted_from_nor): set this flag if booting from NOR
+- board/neo1973/gta02/gta02.c (board_late_init): always enter the boot menu if
+  booting from NOR
+- board/neo1973/gta02/gta02.c (board_late_init): used the opportunity to place
+  the "extern"s at a more prominent location
+
+Index: u-boot/board/neo1973/gta02/gta02.c
+===================================================================
+--- u-boot.orig/board/neo1973/gta02/gta02.c
++++ u-boot/board/neo1973/gta02/gta02.c
+@@ -216,8 +216,10 @@ int board_init(void)
+ 
+ int board_late_init(void)
+ {
+-	S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
+ 	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];
+ 	int menu_vote = 0; /* <= 0: no, > 0: yes */
+@@ -307,7 +309,7 @@ continue_boot:
+ 	}
+ #endif
+ 
+-	if (menu_vote > 0) {
++	if (menu_vote > 0 || booted_from_nor) {
+ 		neo1973_bootmenu();
+ 		nobootdelay = 1;
+ 	}
+Index: u-boot/cpu/arm920t/start.S
+===================================================================
+--- u-boot.orig/cpu/arm920t/start.S
++++ u-boot/cpu/arm920t/start.S
+@@ -106,6 +106,16 @@ _booted_from_nand:
+ 	.word	booted_from_nand
+ #endif /* CONFIG_S3C2410_NAND_BOOT */
+ 
++#ifndef CFG_NO_FLASH
++.globl booted_from_nor
++booted_from_nor:
++	.word	0
++_booted_from_nor:
++	.word	booted_from_nor
++_end_if_0:
++	.word	__bss_start-_start
++#endif /* !CFG_NO_FLASH */
++
+ _TEXT_BASE:
+ 	.word	TEXT_BASE
+ 
+@@ -387,6 +397,15 @@ copy_loop:
+ 	stmia	r1!, {r3-r10}		/* copy to   target address [r1]    */
+ 	cmp	r0, r2			/* until source end address [r2]    */
+ 	ble	copy_loop
++
++#ifndef CFG_NO_FLASH
++	ldr	r0, _end_if_0		/* are we booting from NOR ? */
++	cmp	r0, r2
++	ldreq	r0, _booted_from_nor	/* remember that we've booted from  */
++	moveq	r1, #1			/* NOR                              */
++	streqb	r1, [r0]
++#endif /* !CFG_NO_FLASH */
++
+ 	mov	r0, #0			/* flush v3/v4 cache */
+ 	mcr	p15, 0, r0, c7, c7, 0
+ 	ldr	pc, _done_relocate	/* jump to relocated code */

Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series	2008-03-03 14:58:04 UTC (rev 4149)
+++ trunk/src/target/u-boot/patches/series	2008-03-03 15:14:03 UTC (rev 4150)
@@ -73,6 +73,7 @@
 gta02-splash.patch
 gta02-bootmenu.patch
 gta02-nor.patch
+nor-bootmenu.patch
 glamo-mmc.patch
 glamo-regs.patch
 





More information about the commitlog mailing list