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

werner at sita.openmoko.org werner at sita.openmoko.org
Thu Mar 8 23:44:21 CET 2007


Author: werner
Date: 2007-03-08 23:44:17 +0100 (Thu, 08 Mar 2007)
New Revision: 1285

Modified:
   trunk/src/target/u-boot/patches/boot-menu.patch
Log:
board/neo1973/bootmenu.c (init_bootmenu, bootmenu_hook): evaluate
  "boot_menu_timeout" on every timer tick, so change from concurrent console is
  picked up without a menu restart



Modified: trunk/src/target/u-boot/patches/boot-menu.patch
===================================================================
--- trunk/src/target/u-boot/patches/boot-menu.patch	2007-03-08 22:27:48 UTC (rev 1284)
+++ trunk/src/target/u-boot/patches/boot-menu.patch	2007-03-08 22:44:17 UTC (rev 1285)
@@ -22,7 +22,7 @@
 ===================================================================
 --- /dev/null
 +++ u-boot/board/neo1973/bootmenu.c
-@@ -0,0 +1,365 @@
+@@ -0,0 +1,366 @@
 +/*
 + * bootmenu.c - Boot menu
 + *
@@ -100,7 +100,6 @@
 +static int map[MAX_MENU_ITEMS];
 +static int options = 0;
 +static int width = sizeof(FACTORY_TXT)-1;
-+static int boot_menu_timeout;
 +
 +static device_t *bm_con;
 +
@@ -233,11 +232,6 @@
 +	map[options+1] = options+1;
 +
 +	bm_printf("\n\nPress [AUX] to select, [POWER] to execute.\n");
-+
-+	boot_menu_timeout = get_var_positive_int("boot_menu_timeout",
-+	    BOOT_MENU_TIMEOUT);
-+	if (boot_menu_timeout < MIN_BOOT_MENU_TIMEOUT)
-+		boot_menu_timeout = MIN_BOOT_MENU_TIMEOUT;
 +}
 +
 +
@@ -349,11 +343,18 @@
 +		seconds = 0;
 +	}
 +	on = tmp;
-+	if (neo1973_new_second())
-+		if (++seconds > boot_menu_timeout) {
++	if (neo1973_new_second()) {
++		int timeout;
++
++		timeout = get_var_positive_int("boot_menu_timeout",
++		    BOOT_MENU_TIMEOUT);
++		if (timeout < MIN_BOOT_MENU_TIMEOUT)
++			timeout = MIN_BOOT_MENU_TIMEOUT;
++		if (++seconds > timeout) {
 +			poweroff_if_idle();
 +			seconds = 0;
 +		}
++	}
 +}
 +
 +





More information about the commitlog mailing list