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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to