From 16850919ff8666f20d047cb83b4ee77581336515 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 27 Aug 2006 18:10:01 +0200 Subject: Code cleanup --- board/tqm5200/tqm5200.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'board/tqm5200/tqm5200.c') diff --git a/board/tqm5200/tqm5200.c b/board/tqm5200/tqm5200.c index c8350ab3b..2a0d542ef 100644 --- a/board/tqm5200/tqm5200.c +++ b/board/tqm5200/tqm5200.c @@ -743,7 +743,7 @@ int board_early_init_f (void) /* 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). */ @@ -757,5 +757,5 @@ int board_early_init_f (void) return 0; } -#endif -#endif +#endif /* CONFIG_FO300 */ +#endif /* CONFIG_BOARD_EARLY_INIT_F */ -- cgit v1.2.3-70-g09d2 From aeec782b020930732eab075af97212c3f03afcae Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Wed, 13 Sep 2006 10:47:05 +0200 Subject: Disable autoboot abort for FO300 when silent mode is enabled (according to S1 switch setting). Patch by Marian Balakowicz, 12 Sep 2006 --- CHANGELOG | 3 ++ board/tqm5200/tqm5200.c | 74 +++++++++++++++++++++++++++++-------------------- 2 files changed, 47 insertions(+), 30 deletions(-) (limited to 'board/tqm5200/tqm5200.c') diff --git a/CHANGELOG b/CHANGELOG index a25134fa7..a896e253a 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 2a0d542ef..b76579cb4 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 */ -- cgit v1.2.3-70-g09d2 From 1d92b2e550f5c069befe349a294238cee57959a9 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 9 Oct 2006 01:07:53 +0200 Subject: TQM5200: perform POST memory test only on STK52xx carrier board. (and then only if PSC6_3 is read as "1" when booting). Patch by Martin Krause, 21 Jun 2006 --- CHANGELOG | 4 ++++ board/tqm5200/tqm5200.c | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'board/tqm5200/tqm5200.c') diff --git a/CHANGELOG b/CHANGELOG index 1d879c4ff..cc966ea97 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,10 @@ Changes since U-Boot 1.1.4: ====================================================================== +* TQM5200: perform POST memory test only on STK52xx carrier board. + (and then only if PSC6_3 is read as "1" when booting). + Patch by Martin Krause, 21 Jun 2006 + * Move "ar" flags to config.mk to allow for silent "make -s" Based on patch by Mike Frysinger, 20 Jun 2006 diff --git a/board/tqm5200/tqm5200.c b/board/tqm5200/tqm5200.c index b76579cb4..1d81dce60 100644 --- a/board/tqm5200/tqm5200.c +++ b/board/tqm5200/tqm5200.c @@ -396,6 +396,7 @@ void ide_set_reset (int idereset) */ int post_hotkeys_pressed(void) { +#ifdef CONFIG_STK52XX struct mpc5xxx_gpio *gpio; gpio = (struct mpc5xxx_gpio*) MPC5XXX_GPIO; @@ -414,6 +415,9 @@ int post_hotkeys_pressed(void) gpio->simple_ddr &= ~(0x20000000); return ((gpio->simple_ival & 0x20000000) ? 0 : 1); +#else + return 0; +#endif } #endif -- cgit v1.2.3-70-g09d2