public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] rockchip: clk: rv1108: remove duplicate reset init
@ 2019-10-23 17:45 Heiko Stuebner
  2019-10-23 17:45 ` [U-Boot] [PATCH 2/2] rockchip: clk: fix wrong CONFIG_IS_ENABLED handling Heiko Stuebner
  2019-11-07  9:03 ` [U-Boot] [PATCH 1/2] rockchip: clk: rv1108: remove duplicate reset init Kever Yang
  0 siblings, 2 replies; 6+ messages in thread
From: Heiko Stuebner @ 2019-10-23 17:45 UTC (permalink / raw)
  To: u-boot

rockchip_reset_bind() already does the needed init for the reset
registers, only referenced the wrong cru structure.

So we can get rid of the open-coded reset init and just fix
the correct cru reference.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 drivers/clk/rockchip/clk_rv1108.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c
index 3ebb007fab..5dc31e1eb0 100644
--- a/drivers/clk/rockchip/clk_rv1108.c
+++ b/drivers/clk/rockchip/clk_rv1108.c
@@ -698,22 +698,11 @@ static int rv1108_clk_bind(struct udevice *dev)
 	}
 
 #if CONFIG_IS_ENABLED(CONFIG_RESET_ROCKCHIP)
-	ret = offsetof(struct rk3368_cru, softrst_con[0]);
+	ret = offsetof(struct rv1108_cru, softrst_con[0]);
 	ret = rockchip_reset_bind(dev, ret, 13);
 	if (ret)
 		debug("Warning: software reset driver bind faile\n");
 #endif
-	ret = device_bind_driver_to_node(dev, "rockchip_reset", "reset",
-					 dev_ofnode(dev), &sf_child);
-	if (ret) {
-		debug("Warning: No rockchip reset driver: ret=%d\n", ret);
-	} else {
-		sf_priv = malloc(sizeof(struct softreset_reg));
-		sf_priv->sf_reset_offset = offsetof(struct rv1108_cru,
-						    softrst_con[0]);
-		sf_priv->sf_reset_num = 13;
-		sf_child->priv = sf_priv;
-	}
 
 	return 0;
 }
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-11-08 23:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-23 17:45 [U-Boot] [PATCH 1/2] rockchip: clk: rv1108: remove duplicate reset init Heiko Stuebner
2019-10-23 17:45 ` [U-Boot] [PATCH 2/2] rockchip: clk: fix wrong CONFIG_IS_ENABLED handling Heiko Stuebner
2019-11-07  9:04   ` Kever Yang
2019-11-07  9:03 ` [U-Boot] [PATCH 1/2] rockchip: clk: rv1108: remove duplicate reset init Kever Yang
2019-11-07  9:13   ` Heiko Stübner
2019-11-08 23:11     ` Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox