[U-Boot] [PATCH] i2c: cdns: Covert to livetree function

Michal Simek michal.simek at xilinx.com
Fri Jan 18 09:47:22 UTC 2019


Update cadence i2c driver to support livetree
Similar changes were done by:
"net: zynq_gem: convert to use livetree"
(sha1: 26026e695afa794ac018a09e79a48120d322b60d)

Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

 drivers/i2c/i2c-cdns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/i2c-cdns.c b/drivers/i2c/i2c-cdns.c
index f2c4b2073c48..4330d28c2b0d 100644
--- a/drivers/i2c/i2c-cdns.c
+++ b/drivers/i2c/i2c-cdns.c
@@ -419,7 +419,7 @@ static int cdns_i2c_ofdata_to_platdata(struct udevice *dev)
 	struct clk clk;
 	int ret;
 
-	i2c_bus->regs = (struct cdns_i2c_regs *)devfdt_get_addr(dev);
+	i2c_bus->regs = (struct cdns_i2c_regs *)dev_read_addr(dev);
 	if (!i2c_bus->regs)
 		return -ENOMEM;
 
-- 
1.9.1



More information about the U-Boot mailing list