diff options
author | Mario Six <mario.six@gdsys.cc> | 2018-03-28 14:37:43 +0200 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2018-04-11 11:34:46 +0200 |
commit | d934832de6e62ca21c99a4fbad808175801f4018 (patch) | |
tree | a0e9572e2538759399013cf6f7039a1be58bd32b /drivers | |
parent | 2df71d6d6a364f92510cfa657d7407cf7e516570 (diff) |
i2c: fsl: Use dev_read_addr
Since bus translations are now fully supported, use a plain
"dev_read_addr" to get the device address from the device tree.
Signed-off-by: Mario Six <mario.six@gdsys.cc>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/fsl_i2c.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c index cb0f5ea233..ad8eea4389 100644 --- a/drivers/i2c/fsl_i2c.c +++ b/drivers/i2c/fsl_i2c.c @@ -573,11 +573,8 @@ static int fsl_i2c_set_bus_speed(struct udevice *bus, uint speed) static int fsl_i2c_ofdata_to_platdata(struct udevice *bus) { struct fsl_i2c_dev *dev = dev_get_priv(bus); - fdt_addr_t addr; - addr = dev_read_u32_default(bus, "reg", -1); - - dev->base = map_sysmem(CONFIG_SYS_IMMR + addr, sizeof(struct fsl_i2c_base)); + dev->base = map_sysmem(dev_read_addr(bus), sizeof(struct fsl_i2c_base)); if (!dev->base) return -ENOMEM; |