summaryrefslogtreecommitdiff
path: root/board/mcc200/auto_update.c
diff options
context:
space:
mode:
authorJon Loeliger <jdl@freescale.com>2007-08-13 11:01:52 -0500
committerJon Loeliger <jdl@freescale.com>2007-08-13 11:01:52 -0500
commit8e2dd87eee01bb1b83beab7caf22b851c5cafb2c (patch)
tree47a43e05d90de7d64ed356bab5f15e8d89f5b5cc /board/mcc200/auto_update.c
parentcca34967cbd13ff6bd352be29e3f1cc88ab24c05 (diff)
parent9986bc3e40e899bea372a99a2bca4071bdf2e24b (diff)
downloadu-boot-imx-8e2dd87eee01bb1b83beab7caf22b851c5cafb2c.zip
u-boot-imx-8e2dd87eee01bb1b83beab7caf22b851c5cafb2c.tar.gz
u-boot-imx-8e2dd87eee01bb1b83beab7caf22b851c5cafb2c.tar.bz2
Merge commit 'remotes/wd/master'
Conflicts: MAKEALL With any luck, this is the last MAKEALL merge conflict!
Diffstat (limited to 'board/mcc200/auto_update.c')
-rw-r--r--board/mcc200/auto_update.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/board/mcc200/auto_update.c b/board/mcc200/auto_update.c
index 6044565..28e4c87 100644
--- a/board/mcc200/auto_update.c
+++ b/board/mcc200/auto_update.c
@@ -330,6 +330,8 @@ int do_auto_update(void)
int i, res = 0, bitmap_first, cnt, old_ctrlc, got_ctrlc;
char *env;
long start, end;
+
+#if 0 /* disable key-press detection to speed up boot-up time */
uchar keypad_status1[2] = {0,0}, keypad_status2[2] = {0,0};
/*
@@ -347,6 +349,7 @@ int do_auto_update(void)
return 0;
}
+#endif
au_usb_stor_curr_dev = -1;
/* start USB */
if (usb_stop() < 0) {
@@ -364,18 +367,21 @@ int do_auto_update(void)
au_usb_stor_curr_dev = usb_stor_scan(0);
if (au_usb_stor_curr_dev == -1) {
debug ("No device found. Not initialized?\n");
- return -1;
+ res = -1;
+ goto xit;
}
/* check whether it has a partition table */
stor_dev = get_dev("usb", 0);
if (stor_dev == NULL) {
debug ("uknown device type\n");
- return -1;
+ res = -1;
+ goto xit;
}
if (fat_register_device(stor_dev, 1) != 0) {
debug ("Unable to use USB %d:%d for fatls\n",
au_usb_stor_curr_dev, 1);
- return -1;
+ res = -1;
+ goto xit;
}
if (file_fat_detectfs() != 0) {
debug ("file_fat_detectfs failed\n");
@@ -504,7 +510,7 @@ int do_auto_update(void)
} while (res < 0);
#endif
}
- usb_stop();
+
/* restore the old state */
disable_ctrlc(old_ctrlc);
#ifdef CONFIG_PROGRESSBAR
@@ -517,6 +523,8 @@ int do_auto_update(void)
lcd_enable();
}
#endif
- return 0;
+ xit:
+ usb_stop();
+ return res;
}
#endif /* CONFIG_AUTO_UPDATE */