]> git.sur5r.net Git - u-boot/blobdiff - common/devices.c
cmd_bootm.c: Fix problem with '#if (CONFIG_CMD_USB)'
[u-boot] / common / devices.c
index 7c859521a3b9548d07d5e13b66bcb1c68dea2a99..9cc963ac204efbd7c965937ef22fee5f402883ef 100644 (file)
@@ -26,6 +26,7 @@
 #include <stdarg.h>
 #include <malloc.h>
 #include <devices.h>
+#include <serial.h>
 #ifdef CONFIG_LOGBUFFER
 #include <logbuff.h>
 #endif
@@ -33,6 +34,8 @@
 #include <i2c.h>
 #endif
 
+DECLARE_GLOBAL_DATA_PTR;
+
 list_t devlist = 0;
 device_t *stdio_devices[] = { NULL, NULL, NULL };
 char *stdio_names[MAX_FILES] = { "stdin", "stdout", "stderr" };
@@ -122,7 +125,7 @@ int device_deregister(char *devname)
        device_t *dev = NULL;
        char temp_names[3][8];
 
-       dev_index=-1;
+       dev_index = -1;
        for (i=1; i<=ListNumItems(devlist); i++) {
                dev = ListGetPtrToItem (devlist, i);
                if(strcmp(dev->name,devname)==0) {
@@ -159,8 +162,6 @@ int device_deregister(char *devname)
 int devices_init (void)
 {
 #ifndef CONFIG_ARM     /* already relocated for current ARM implementation */
-       DECLARE_GLOBAL_DATA_PTR;
-
        ulong relocation_offset = gd->reloc_off;
        int i;
 
@@ -194,9 +195,15 @@ int devices_init (void)
        drv_logbuff_init ();
 #endif
        drv_system_init ();
+#ifdef CONFIG_SERIAL_MULTI
+       serial_devices_init ();
+#endif
 #ifdef CONFIG_USB_TTY
        drv_usbtty_init ();
 #endif
+#ifdef CONFIG_NETCONSOLE
+       drv_nc_init ();
+#endif
 
        return (0);
 }