]> git.sur5r.net Git - u-boot/blobdiff - common/stdio.c
ppc: Move mirror_hack to arch_global_data
[u-boot] / common / stdio.c
index b20772c45d7f05d550a358fcbf1755c501e6e5b9..97ff9cf4a6a49f533f90240e9469bd4063986a11 100644 (file)
@@ -135,7 +135,6 @@ struct stdio_dev* stdio_clone(struct stdio_dev *dev)
                return NULL;
 
        memcpy(_dev, dev, sizeof(struct stdio_dev));
-       strncpy(_dev->name, dev->name, 16);
 
        return _dev;
 }
@@ -160,7 +159,7 @@ int stdio_deregister(const char *devname)
        int l;
        struct list_head *pos;
        struct stdio_dev *dev;
-       char temp_names[3][8];
+       char temp_names[3][16];
 
        dev = stdio_get_by_name(devname);
 
@@ -174,7 +173,7 @@ int stdio_deregister(const char *devname)
                }
                memcpy (&temp_names[l][0],
                        stdio_devices[l]->name,
-                       sizeof(stdio_devices[l]->name));
+                       sizeof(temp_names[l]));
        }
 
        list_del(&(dev->list));
@@ -227,9 +226,7 @@ int stdio_init (void)
        drv_logbuff_init ();
 #endif
        drv_system_init ();
-#ifdef CONFIG_SERIAL_MULTI
        serial_stdio_init ();
-#endif
 #ifdef CONFIG_USB_TTY
        drv_usbtty_init ();
 #endif
@@ -239,6 +236,8 @@ int stdio_init (void)
 #ifdef CONFIG_JTAG_CONSOLE
        drv_jtag_console_init ();
 #endif
-
+#ifdef CONFIG_CBMEM_CONSOLE
+       cbmemc_init();
+#endif
        return (0);
 }