]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: clk: rk3399: Convert to livetree
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tue, 12 Sep 2017 15:32:24 +0000 (17:32 +0200)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Mon, 18 Sep 2017 18:40:37 +0000 (20:40 +0200)
Update the clock driver for the RK3399  to support a live device tree.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/clk/rockchip/clk_rk3399.c

index 168c9ddba3363427bcb5f571f446a2a4270a04fd..9d963be5529a74a85767519b82e39a0a8c931dc5 100644 (file)
@@ -990,7 +990,7 @@ static int rk3399_clk_ofdata_to_platdata(struct udevice *dev)
 #if !CONFIG_IS_ENABLED(OF_PLATDATA)
        struct rk3399_clk_priv *priv = dev_get_priv(dev);
 
-       priv->cru = (struct rk3399_cru *)devfdt_get_addr(dev);
+       priv->cru = dev_read_addr_ptr(dev);
 #endif
        return 0;
 }
@@ -1174,7 +1174,7 @@ static int rk3399_pmuclk_ofdata_to_platdata(struct udevice *dev)
 #if !CONFIG_IS_ENABLED(OF_PLATDATA)
        struct rk3399_pmuclk_priv *priv = dev_get_priv(dev);
 
-       priv->pmucru = (struct rk3399_pmucru *)devfdt_get_addr(dev);
+       priv->pmucru = dev_read_addr_ptr(dev);
 #endif
        return 0;
 }