summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2007-08-12 15:11:38 +0200
committerWolfgang Denk <wd@denx.de>2007-08-12 15:11:38 +0200
commita4d2636f2a859245ed3a401f26189da2dfda4ceb (patch)
tree2c7e5f717a09944ea3d5141166a0d759fd5820d1 /board
parent308e2b3a6c3fd84fceada79b3d4a559280d326a6 (diff)
downloadu-boot-imx-a4d2636f2a859245ed3a401f26189da2dfda4ceb.zip
u-boot-imx-a4d2636f2a859245ed3a401f26189da2dfda4ceb.tar.gz
u-boot-imx-a4d2636f2a859245ed3a401f26189da2dfda4ceb.tar.bz2
Adapt board configuration and fix kernel crash on MCC200 board.
The update procedure was modified to turn off the USB subsystem before exit for MCC200 and TRAB. This is necessary as otherwise the USB controller continues to write periodically to system memory! MCC200-specific notes: - the patch disables the magic key check for MCC200 - the patch contains the configuration changes made for the new revision of the board. Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'board')
-rw-r--r--board/mcc200/auto_update.c18
-rw-r--r--board/trab/auto_update.c16
2 files changed, 23 insertions, 11 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 */
diff --git a/board/trab/auto_update.c b/board/trab/auto_update.c
index 92120b0..54d3645 100644
--- a/board/trab/auto_update.c
+++ b/board/trab/auto_update.c
@@ -450,7 +450,7 @@ do_auto_update(void)
{
block_dev_desc_t *stor_dev;
long sz;
- int i, res, bitmap_first, cnt, old_ctrlc, got_ctrlc;
+ int i, res = 0, bitmap_first, cnt, old_ctrlc, got_ctrlc;
char *env;
long start, end;
@@ -477,18 +477,21 @@ 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");
@@ -648,9 +651,10 @@ do_auto_update(void)
/* enable the power switch */
*CPLD_VFD_BK &= ~POWER_OFF;
}
- usb_stop();
/* restore the old state */
disable_ctrlc(old_ctrlc);
- return 0;
+xit:
+ usb_stop();
+ return res;
}
#endif /* CONFIG_AUTO_UPDATE */