summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-07-26 17:34:28 -0400
committerTom Rini <trini@konsulko.com>2016-07-26 17:34:28 -0400
commit9c7a0a600bfc8741e2941ce9bb965f2e77d6bbea (patch)
treea475756b966b614ad545299fa82dfd89c863aab8 /drivers/i2c
parentc3c9fd31bad80ead1682de917e27fa6073eae02b (diff)
parent8401c7103d73b4010df95bf8bc79a60f378f1e50 (diff)
Merge git://git.denx.de/u-boot-fsl-qoriq
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/fsl_i2c.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c
index b8cc647bd3..407c4a7b10 100644
--- a/drivers/i2c/fsl_i2c.c
+++ b/drivers/i2c/fsl_i2c.c
@@ -583,12 +583,11 @@ static int fsl_i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
static int fsl_i2c_ofdata_to_platdata(struct udevice *bus)
{
struct fsl_i2c_dev *dev = dev_get_priv(bus);
- u64 reg;
- u32 addr, size;
+ fdt_addr_t addr;
+ fdt_size_t size;
- reg = fdtdec_get_addr(gd->fdt_blob, bus->of_offset, "reg");
- addr = reg >> 32;
- size = reg & 0xFFFFFFFF;
+ addr = fdtdec_get_addr_size_auto_noparent(gd->fdt_blob, bus->of_offset,
+ "reg", 0, &size);
dev->base = map_sysmem(CONFIG_SYS_IMMR + addr, size);