]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/stdio.c
Merge git://git.denx.de/u-boot-socfpga
[people/ms/u-boot.git] / common / stdio.c
index a7d016bb9d2409d3e226afe41495fe30d69063d8..ee4f0bda9ea72f69efbefcaa3849a3f5b8f422ca 100644 (file)
@@ -21,7 +21,7 @@
 #include <logbuff.h>
 #endif
 
-#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
+#if defined(CONFIG_SYS_I2C)
 #include <i2c.h>
 #endif
 
@@ -151,9 +151,10 @@ static int stdio_probe_device(const char *name, enum uclass_id id,
        *sdevp = NULL;
        seq = trailing_strtoln(name, NULL);
        if (seq == -1)
+               seq = 0;
+       ret = uclass_get_device_by_seq(id, seq, &dev);
+       if (ret == -ENODEV)
                ret = uclass_first_device_err(id, &dev);
-       else
-               ret = uclass_get_device_by_seq(id, seq, &dev);
        if (ret) {
                debug("No %s device for seq %d (%s)\n", uclass_get_name(id),
                      seq, name);
@@ -345,9 +346,6 @@ int stdio_add_devices(void)
 #ifdef CONFIG_SYS_I2C
        i2c_init_all();
 #else
-#if defined(CONFIG_HARD_I2C)
-       i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-#endif
 #endif
 #ifdef CONFIG_DM_VIDEO
        /*