i2c: Update drivers to use enum for speed
[oweals/u-boot.git] / drivers / i2c / mvtwsi.c
index 0a2dafcec6caceb1b0b25f1417112ae8da7657af..382cf4b30413a3379e454c83c71bc47d94560d3c 100644 (file)
@@ -805,8 +805,9 @@ static int mvtwsi_i2c_ofdata_to_platdata(struct udevice *bus)
                                    "cell-index", -1);
        dev->slaveadd = fdtdec_get_int(gd->fdt_blob, dev_of_offset(bus),
                                       "u-boot,i2c-slave-addr", 0x0);
-       dev->speed = fdtdec_get_int(gd->fdt_blob, dev_of_offset(bus),
-                                   "clock-frequency", 100000);
+       dev->speed = dev_read_u32_default(bus, "clock-frequency",
+                                         I2C_SPEED_STANDARD_RATE);
+
        return 0;
 }