From 1611e8ca954f49e5f2f0eabcabd663209e04c6d1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 6 Jul 2007 19:20:21 +0000 Subject: 2007-07-06 Joel Sherrill * clock/clock.c, console/console.c: Add clock HW initialization missed in earlier conversion. --- c/src/lib/libbsp/powerpc/gen5200/console/console.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'c/src/lib/libbsp/powerpc/gen5200/console/console.c') diff --git a/c/src/lib/libbsp/powerpc/gen5200/console/console.c b/c/src/lib/libbsp/powerpc/gen5200/console/console.c index e6ebb56bfb..e897d869fc 100644 --- a/c/src/lib/libbsp/powerpc/gen5200/console/console.c +++ b/c/src/lib/libbsp/powerpc/gen5200/console/console.c @@ -651,12 +651,17 @@ int mpc5200_uart_write(int minor, const char *buf, int len) * Print functions prototyped in bspIo.h */ static void A_BSP_output_char( char c ) - { +{ char cr = '\r'; - - if(console_initialized == TRUE) - { + /* + * If we are using U-Boot, then the console is already initialized + * and we can just poll bytes out at any time. + */ + #if !defined(HAS_UBOOT) + if (console_initialized == FALSE ) + return + #endif #define PRINTK_WRITE mpc5200_uart_pollWrite @@ -664,10 +669,7 @@ static void A_BSP_output_char( char c ) if( c == '\n' ) PRINTK_WRITE( PRINTK_MINOR, &cr, 1 ); - - } - - } +} /* *************** -- cgit v1.2.3