[U-Boot,5/6] rockchip: clk: rk3328: convert to use live dt

Message ID 1518321190-25821-5-git-send-email-kever.yang@rock-chips.com
State Accepted
Delegated to: Philipp Tomsich
Headers show
Series
  • [U-Boot,1/6] rockchip: clk: rk3036: convert to use live dt
Related show

Commit Message

Kever Yang Feb. 11, 2018, 3:53 a.m.
Use live dt api to get cru base addr.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

 drivers/clk/rockchip/clk_rk3328.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dr. Philipp Tomsich Feb. 16, 2018, 5:12 p.m. | #1
> Use live dt api to get cru base addr.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
>  drivers/clk/rockchip/clk_rk3328.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Dr. Philipp Tomsich Feb. 16, 2018, 5:19 p.m. | #2
> Use live dt api to get cru base addr.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> 
>  drivers/clk/rockchip/clk_rk3328.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Dr. Philipp Tomsich Feb. 20, 2018, 9 a.m. | #3
> Use live dt api to get cru base addr.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> 
>  drivers/clk/rockchip/clk_rk3328.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to u-boot-rockchip/next, thanks!

Patch

diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c
index 2ccc798..046b4e4 100644
--- a/drivers/clk/rockchip/clk_rk3328.c
+++ b/drivers/clk/rockchip/clk_rk3328.c
@@ -767,7 +767,7 @@  static int rk3328_clk_ofdata_to_platdata(struct udevice *dev)
 {
 	struct rk3328_clk_priv *priv = dev_get_priv(dev);
 
-	priv->cru = (struct rk3328_cru *)devfdt_get_addr(dev);
+	priv->cru = dev_read_addr_ptr(dev);
 
 	return 0;
 }