[U-Boot-Users] [PATCH] Add MIMC200 board - now uses board_eth_init()

Mark Jackson mpfj at mimc.co.uk
Wed Jul 30 11:03:04 CEST 2008


Scott Wood wrote:
> On Tue, Jul 29, 2008 at 09:52:12AM +0100, Mark Jackson wrote:
>> I didn't want to use u-boot's "slient boot" options, since they're 
>> hard-coded at compile time.  The only place I could think to this was to 
>> modify the atmel_usart.c file as above.
> 
> It's not hard-coded at compile-time -- set GD_FLG_SILENT in gd->flags
> from early board code depending on the state of the GPIO pin.  For
> example, 8313erdb does this depending on whether it's booting or resuming
> from suspend.

Yes ... I can see that can be used to disable any console outputs.

*But* I'm also needing to disable any console *inputs* in a similar way.

Any ideas on how to do that ?

I'm guessing I need any extra "silent" check in console.c tstc() ?

Is it acceptable to modify console.c if I use a nicely generic #ifdef ?

e.g.

int tstc (void)
{
+#if defined(CONFIG_SILENT_CONSOLE) && defined(CONFIG_SILENT_CONSOLE_INPUT)
+	if (gd->flags & GD_FLG_SILENT)
+		return 0;
+#endif
+
	if (gd->flags & GD_FLG_DEVINIT) {
		/* Test the standard input */
		return ftstc (stdin);
	}

	/* Send directly to the handler */
	return serial_tstc ();
}

Mark




More information about the U-Boot mailing list