summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/mbx8xx/console/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/powerpc/mbx8xx/console/console.c')
-rw-r--r--c/src/lib/libbsp/powerpc/mbx8xx/console/console.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/console/console.c b/c/src/lib/libbsp/powerpc/mbx8xx/console/console.c
index e5507eeb0c..c723c80c48 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/console/console.c
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/console/console.c
@@ -537,6 +537,13 @@ serial_init()
unsigned int dpaddr, memaddr;
bd_t *bd;
+#if NVRAM_CONFIGURE == 1
+ if ( ((nvram->console_mode & 0x06) != 0x04 ) ||
+ ((nvram->console_mode & 0x30) != 0x20 )) {
+ /*
+ * FIXME: refine this condition...
+ */
+#endif
bd = eppcbugInfo;
cp = cpmp;
@@ -642,7 +649,26 @@ serial_init()
/* Enable transmitter/receiver.
*/
sp->smc_smcmr |= SMCMR_REN | SMCMR_TEN;
+#if NVRAM_CONFIGURE == 1
+ }
+ else {
+ const char bootmsg_text[]= "using EPPC bug for console I/O\n";
+ _EPPCBug_pollWrite((nvram->console_printk_port & 0x70) >> 4,
+ bootmsg_text,
+ sizeof(bootmsg_text)-1);
+ }
+#endif
+#if NVRAM_CONFIGURE == 1
+ if ((nvram->console_mode & 0x30) == 0x20 ) {
+ BSP_output_char = _BSP_output_char;
+ }
+ else {
+ BSP_output_char = serial_putchar;
+ }
+#else
+
BSP_output_char = serial_putchar;
+#endif
}
void