diff options
author | Eugen Hristev <eugen.hristev@collabora.com> | 2023-05-15 13:55:04 +0300 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2023-05-17 12:36:18 +0300 |
commit | bb52f1c604d09b0c378addfa5c75c82efc219b03 (patch) | |
tree | af0eb7040455d593aecce1fd8ce250afa45d868b /drivers/clk | |
parent | 6891bdf711126425f33890ba23fb02ba84b9b698 (diff) | |
download | u-boot-bb52f1c604d09b0c378addfa5c75c82efc219b03.tar.xz |
reset: rockchip: implement rk3588 lookup table
The current DT bindings for the rk3588 clock use a different ID than the
one that is supposed to be written to the hardware registers.
Thus, we cannot use directly the id provided in the phandle, but rather
use a lookup table to correctly setup the hardware.
This approach has been implemented already in Linux, by commit :
f1c506d152ff ("clk: rockchip: add clock controller for the RK3588")
Hence, implement a similar approach using the lookup table, and adapt
the existing reset driver to work with SoCs using lookup table.
The file rst-rk3588.c has been copied as much as possible from Linux.
Adapt the clk rk3588 driver as well to bind the reset driver with the
lookup table.
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/rockchip/clk_rk3588.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/rockchip/clk_rk3588.c b/drivers/clk/rockchip/clk_rk3588.c index 5c27626df7..119b1337bd 100644 --- a/drivers/clk/rockchip/clk_rk3588.c +++ b/drivers/clk/rockchip/clk_rk3588.c @@ -1996,7 +1996,7 @@ static int rk3588_clk_bind(struct udevice *dev) #if CONFIG_IS_ENABLED(RESET_ROCKCHIP) ret = offsetof(struct rk3588_cru, softrst_con[0]); - ret = rockchip_reset_bind(dev, ret, 49158); + ret = rk3588_reset_bind_lut(dev, ret, 49158); if (ret) debug("Warning: software reset driver bind failed\n"); #endif |