diff options
Diffstat (limited to 'drivers/i2c/fsl_i2c.c')
-rw-r--r-- | drivers/i2c/fsl_i2c.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c index c3f826d68c..e9fbf828f3 100644 --- a/drivers/i2c/fsl_i2c.c +++ b/drivers/i2c/fsl_i2c.c @@ -585,21 +585,21 @@ static int fsl_i2c_ofdata_to_platdata(struct udevice *bus) struct fsl_i2c_dev *dev = dev_get_priv(bus); fdt_addr_t addr; fdt_size_t size; + int node = dev_of_offset(bus); - addr = fdtdec_get_addr_size_auto_noparent(gd->fdt_blob, bus->of_offset, - "reg", 0, &size, false); + addr = fdtdec_get_addr_size_auto_noparent(gd->fdt_blob, node, "reg", 0, + &size, false); dev->base = map_sysmem(CONFIG_SYS_IMMR + addr, size); if (!dev->base) return -ENOMEM; - dev->index = fdtdec_get_int(gd->fdt_blob, bus->of_offset, - "cell-index", -1); - dev->slaveadd = fdtdec_get_int(gd->fdt_blob, bus->of_offset, + dev->index = fdtdec_get_int(gd->fdt_blob, node, "cell-index", -1); + dev->slaveadd = fdtdec_get_int(gd->fdt_blob, node, "u-boot,i2c-slave-addr", 0x7f); - dev->speed = fdtdec_get_int(gd->fdt_blob, bus->of_offset, - "clock-frequency", 400000); + dev->speed = fdtdec_get_int(gd->fdt_blob, node, "clock-frequency", + 400000); dev->i2c_clk = dev->index ? gd->arch.i2c2_clk : gd->arch.i2c1_clk; |