|
@@ -578,7 +578,11 @@ mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data,
|
|
|
goto out;
|
|
|
}
|
|
|
tclk = clk_get_rate(drv_data->clk);
|
|
|
- of_property_read_u32(np, "clock-frequency", &bus_freq);
|
|
|
+
|
|
|
+ rc = of_property_read_u32(np, "clock-frequency", &bus_freq);
|
|
|
+ if (rc)
|
|
|
+ bus_freq = 100000; /* 100kHz by default */
|
|
|
+
|
|
|
if (!mv64xxx_find_baud_factors(bus_freq, tclk,
|
|
|
&drv_data->freq_n, &drv_data->freq_m)) {
|
|
|
rc = -EINVAL;
|