From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Jackson Date: Wed, 30 Jul 2008 10:03:04 +0100 Subject: [U-Boot-Users] [PATCH] Add MIMC200 board - now uses board_eth_init() In-Reply-To: <20080729200635.GA8569@ld0162-tx32.am.freescale.net> References: <488E1EE7.20104@mimc.co.uk> <488EDA3C.1070101@mimc.co.uk> <20080729200635.GA8569@ld0162-tx32.am.freescale.net> Message-ID: <48902E48.7040705@mimc.co.uk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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