int designware_i2c_ofdata_to_platdata(struct udevice *bus)
{
struct dw_i2c *priv = dev_get_priv(bus);
+ int ret;
if (!priv->regs)
priv->regs = (struct i2c_regs *)devfdt_get_addr_ptr(bus);
dev_read_u32(bus, "i2c-scl-falling-time-ns", &priv->scl_fall_time_ns);
dev_read_u32(bus, "i2c-sda-hold-time-ns", &priv->sda_hold_time_ns);
- return 0;
-}
-
-int designware_i2c_probe(struct udevice *bus)
-{
- struct dw_i2c *priv = dev_get_priv(bus);
- int ret;
-
ret = reset_get_bulk(bus, &priv->resets);
if (ret)
dev_warn(bus, "Can't get reset: %d\n", ret);
}
#endif
+ return 0;
+}
+
+int designware_i2c_probe(struct udevice *bus)
+{
+ struct dw_i2c *priv = dev_get_priv(bus);
+
return __dw_i2c_init(priv->regs, 0, 0);
}