aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-mv64xxx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index ed854573b427..b1f42bf40963 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -578,7 +578,11 @@ mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data,
578 goto out; 578 goto out;
579 } 579 }
580 tclk = clk_get_rate(drv_data->clk); 580 tclk = clk_get_rate(drv_data->clk);
581 of_property_read_u32(np, "clock-frequency", &bus_freq); 581
582 rc = of_property_read_u32(np, "clock-frequency", &bus_freq);
583 if (rc)
584 bus_freq = 100000; /* 100kHz by default */
585
582 if (!mv64xxx_find_baud_factors(bus_freq, tclk, 586 if (!mv64xxx_find_baud_factors(bus_freq, tclk,
583 &drv_data->freq_n, &drv_data->freq_m)) { 587 &drv_data->freq_n, &drv_data->freq_m)) {
584 rc = -EINVAL; 588 rc = -EINVAL;