]> git.sur5r.net Git - u-boot/blobdiff - drivers/i2c/s3c24x0_i2c.c
power: pmic: Let PFUZE3000 see all 256 registers
[u-boot] / drivers / i2c / s3c24x0_i2c.c
index 363cd04e4e2692899b63bad0bbe46613861b6371..ad0bc69fa383e7d64e10ea72131ac9548a96b0e6 100644 (file)
@@ -1,14 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2002
  * David Mueller, ELSOFT AG, d.mueller@elsoft.ch
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
-/* This code should work for both the S3C2400 and the S3C2410
- * as they seem to have the same I2C controller inside.
- * The different address mapping is handled by the s3c24xx.h files below.
- */
 #include <common.h>
 #include <errno.h>
 #include <dm.h>
@@ -312,9 +307,9 @@ static int s3c_i2c_ofdata_to_platdata(struct udevice *dev)
        struct s3c24x0_i2c_bus *i2c_bus = dev_get_priv(dev);
        int node;
 
-       node = dev->of_offset;
+       node = dev_of_offset(dev);
 
-       i2c_bus->regs = (struct s3c24x0_i2c *)dev_get_addr(dev);
+       i2c_bus->regs = (struct s3c24x0_i2c *)devfdt_get_addr(dev);
 
        i2c_bus->id = pinmux_decode_periph_id(blob, node);