]> git.sur5r.net Git - u-boot/blobdiff - board/trizepsiv/conxs.c
Merge branch 'master' of git://git.denx.de/u-boot-i2c
[u-boot] / board / trizepsiv / conxs.c
index 5c0eb41d4b52e838c8d26ce028e4bcf2d80ea0cb..8c1145629f130044b293c2beac12c72e4b5b2d3e 100644 (file)
@@ -44,13 +44,18 @@ extern struct serial_device serial_ffuart_device;
 extern struct serial_device serial_btuart_device;
 extern struct serial_device serial_stuart_device;
 
+#if CONFIG_POLARIS
+#define BOOT_CONSOLE   "serial_stuart"
+#else
+#define BOOT_CONSOLE   "serial_ffuart"
+#endif
 /* ------------------------------------------------------------------------- */
 
 /*
  * Miscelaneous platform dependent initialisations
  */
 
-void usb_board_init(void)
+int usb_board_init(void)
 {
        UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
                ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE);
@@ -71,6 +76,8 @@ void usb_board_init(void)
 
        /* Set port power control mask bits, only 3 ports. */
        UHCRHDB |= (0x7<<17);
+
+       return 0;
 }
 
 void usb_board_init_fail(void)
@@ -89,7 +96,6 @@ void usb_board_stop(void)
 
        CKEN &= ~CKEN10_USBHOST;
 
-       puts("Called USB STOP\n");
        return;
 }
 
@@ -112,17 +118,14 @@ int board_late_init(void)
 #if defined(CONFIG_SERIAL_MULTI)
        char *console=getenv("boot_console");
 
-       if ((strcmp(console,"serial_btuart") == 0) ||
-               (strcmp(console,"serial_stuart") == 0) ||
-               (strcmp(console,"serial_ffuart") == 0)) {
-                       setenv("stdout",console);
-                       setenv("stdin", console);
-                       setenv("stderr",console);
-       } else {
-               setenv("stdout", "serial");
-               setenv("stdin", "serial");
-               setenv("stderr", "serial");
+       if ((console == NULL) || (strcmp(console,"serial_btuart") &&
+               strcmp(console,"serial_stuart") &&
+               strcmp(console,"serial_ffuart"))) {
+                       console = BOOT_CONSOLE;
        }
+       setenv("stdout",console);
+       setenv("stdin", console);
+       setenv("stderr",console);
 #endif
        return 0;
 }