rockchip: clk: rk3368: Convert to livetree
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Mon, 11 Sep 2017 20:04:18 +0000 (22:04 +0200)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Mon, 18 Sep 2017 18:40:34 +0000 (20:40 +0200)
Update the clock driver for the RK3368 to support a live device tree.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Version-changes: 2
- use the dev_read_addr_ptr function in clk_rk3368.c

drivers/clk/rockchip/clk_rk3368.c

index 0160d50c0385c8a63f40bed9909de91f8afc7d55..e2747816b9c7752f5f96eef4c518d4df6f878b54 100644 (file)
@@ -485,7 +485,7 @@ static int rk3368_clk_ofdata_to_platdata(struct udevice *dev)
 #if !CONFIG_IS_ENABLED(OF_PLATDATA)
        struct rk3368_clk_priv *priv = dev_get_priv(dev);
 
-       priv->cru = (struct rk3368_cru *)devfdt_get_addr(dev);
+       priv->cru = dev_read_addr_ptr(dev);
 #endif
 
        return 0;