summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-09-13 10:47:05 +0200
committerWolfgang Denk <wd@pollux.denx.de>2006-09-13 10:47:05 +0200
commitaeec782b020930732eab075af97212c3f03afcae (patch)
treedefb846c24f70b421199dea1c85e326a4ac200f6
parentd214fbbd87e5843855daf6698c95fb96cb529b99 (diff)
downloadu-boot-imx-aeec782b020930732eab075af97212c3f03afcae.zip
u-boot-imx-aeec782b020930732eab075af97212c3f03afcae.tar.gz
u-boot-imx-aeec782b020930732eab075af97212c3f03afcae.tar.bz2
Disable autoboot abort for FO300 when silent mode is enabled
(according to S1 switch setting). Patch by Marian Balakowicz, 12 Sep 2006
-rw-r--r--CHANGELOG3
-rw-r--r--board/tqm5200/tqm5200.c74
2 files changed, 47 insertions, 30 deletions
diff --git a/CHANGELOG b/CHANGELOG
index a25134f..a896e25 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@
Changes since U-Boot 1.1.4:
======================================================================
+* Disable autoboot abort for FO300 when silent mode is enabled
+ (according to S1 switch setting).
+
* Cleanup examples binaries
* Add NAND environment support for PPC440EPx Sequoia NAND boot config
diff --git a/board/tqm5200/tqm5200.c b/board/tqm5200/tqm5200.c
index 2a0d542..b76579c 100644
--- a/board/tqm5200/tqm5200.c
+++ b/board/tqm5200/tqm5200.c
@@ -446,6 +446,43 @@ int board_early_init_r (void)
#endif
#endif /* CONFIG_PS2MULT */
+#ifdef CONFIG_FO300
+int silent_boot (void)
+{
+ vu_long timer3_status;
+
+ /* Configure GPT3 as GPIO input */
+ *(vu_long *)MPC5XXX_GPT3_ENABLE = 0x00000004;
+
+ /* Read in TIMER_3 pin status */
+ timer3_status = *(vu_long *)MPC5XXX_GPT3_STATUS;
+
+#ifdef FO300_SILENT_CONSOLE_WHEN_S1_CLOSED
+ /* Force silent console mode if S1 switch
+ * is in closed position (TIMER_3 pin status is LOW). */
+ if (MPC5XXX_GPT_GPIO_PIN(timer3_status) == 0)
+ return 1;
+#else
+ /* Force silent console mode if S1 switch
+ * is in open position (TIMER_3 pin status is HIGH). */
+ if (MPC5XXX_GPT_GPIO_PIN(timer3_status) == 1)
+ return 1;
+#endif
+
+ return 0;
+}
+
+int board_early_init_f (void)
+{
+ DECLARE_GLOBAL_DATA_PTR;
+
+ if (silent_boot())
+ gd->flags |= GD_FLG_SILENT;
+
+ return 0;
+}
+#endif /* CONFIG_FO300 */
+
int last_stage_init (void)
{
/*
@@ -538,6 +575,13 @@ int last_stage_init (void)
__asm__ volatile ("sync");
}
+#ifdef CONFIG_FO300
+ if (silent_boot()) {
+ setenv("bootdelay", "0");
+ disable_ctrlc(1);
+ }
+#endif
+
return 0;
}
@@ -729,33 +773,3 @@ int board_get_height (void)
}
#endif /* CONFIG_VIDEO_SM501 */
-
-
-#ifdef CONFIG_BOARD_EARLY_INIT_F
-#ifdef CONFIG_FO300
-int board_early_init_f (void)
-{
- vu_long timer3_status;
- DECLARE_GLOBAL_DATA_PTR;
-
- /* Configure GPT3 as GPIO input */
- *(vu_long *)MPC5XXX_GPT3_ENABLE = 0x00000004;
-
- /* Read in TIMER_3 pin status */
- timer3_status = *(vu_long *)MPC5XXX_GPT3_STATUS;
-
-#ifdef FO300_SILENT_CONSOLE_WHEN_S1_CLOSED
- /* Force silent console mode if S1 switch
- * is in closed position (TIMER_3 pin status is LOW). */
- if (MPC5XXX_GPT_GPIO_PIN(timer3_status) == 0)
-#else
- /* Force silent console mode if S1 switch
- * is in open position (TIMER_3 pin status is HIGH). */
- if (MPC5XXX_GPT_GPIO_PIN(timer3_status) == 1)
-#endif
- gd->flags |= GD_FLG_SILENT;
-
- return 0;
-}
-#endif /* CONFIG_FO300 */
-#endif /* CONFIG_BOARD_EARLY_INIT_F */