Merge tag 'u-boot-atmel-fixes-2021.01-b' of https://gitlab.denx.de/u-boot/custodians...
[platform/kernel/u-boot.git] / drivers / i2c / mvtwsi.c
index d3cc9b9..14c594d 100644 (file)
@@ -798,7 +798,7 @@ static int mvtwsi_i2c_ofdata_to_platdata(struct udevice *bus)
 {
        struct mvtwsi_i2c_dev *dev = dev_get_priv(bus);
 
-       dev->base = devfdt_get_addr_ptr(bus);
+       dev->base = dev_read_addr_ptr(bus);
 
        if (!dev->base)
                return -ENOMEM;
@@ -820,10 +820,11 @@ static void twsi_disable_i2c_slave(struct mvtwsi_registers *twsi)
 
 static int mvtwsi_i2c_bind(struct udevice *bus)
 {
-       struct mvtwsi_registers *twsi = devfdt_get_addr_ptr(bus);
+       struct mvtwsi_registers *twsi = dev_read_addr_ptr(bus);
 
        /* Disable the hidden slave in i2c0 of these platforms */
-       if ((IS_ENABLED(CONFIG_ARMADA_38X) || IS_ENABLED(CONFIG_ARCH_KIRKWOOD))
+       if ((IS_ENABLED(CONFIG_ARMADA_38X) || IS_ENABLED(CONFIG_ARCH_KIRKWOOD)
+                               || IS_ENABLED(CONFIG_ARMADA_8K))
                        && bus->req_seq == 0)
                twsi_disable_i2c_slave(twsi);