[PATCH v1 01/11] clk: rockchip: rk3568: fix reset handler

Peter Geis
2022-02-22T01:31:48Z

The reset handler for rk3568 is missing its private data. This leads to
an abort when a reset is triggered.

Add the missing dev_set_priv to the rk3568 clk driver.

Fixes: 4a262feba3a5 ("rockchip: rk3568: add clock driver")

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
---
drivers/clk/rockchip/clk_rk3568.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/clk/rockchip/clk_rk3568.c b/drivers/clk/rockchip/clk_rk3568.c
index d5e45e7602c7..c83ae22dc302 100644
--- a/drivers/clk/rockchip/clk_rk3568.c
+++ b/drivers/clk/rockchip/clk_rk3568.c
@@ -14,6 +14,7 @@
#include <asm/arch-rockchip/clock.h>
#include <asm/arch-rockchip/hardware.h>
#include <asm/io.h>
+#include <dm/device-internal.h>
#include <dm/lists.h>
#include <dt-bindings/clock/rk3568-cru.h>

@@ -2934,6 +2935,7 @@ static int rk3568_clk_bind(struct udevice *dev)
glb_srst_fst);
priv->glb_srst_snd_value = offsetof(struct rk3568_cru,
glb_srsr_snd);
+ dev_set_priv(sys_child, priv);
}

#if CONFIG_IS_ENABLED(RESET_ROCKCHIP)
--
2.25.1