reset: rockchip: implement rk3576 lookup table
The current DT bindings for the rk3576 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 follows the implementation done in the Linux-Kernel and also how the rk3588 does this both in the Linux-Kernel as well as U-Boot. Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> [adapted from mainline Linux code for u-boot] Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
@@ -224,6 +224,16 @@ int rockchip_reset_bind_lut(struct udevice *pdev, const int *lookup_table,
|
||||
* Return: 0 success, or error value
|
||||
*/
|
||||
int rk3528_reset_bind_lut(struct udevice *pdev, u32 reg_offset, u32 reg_number);
|
||||
/*
|
||||
* rk3576_reset_bind_lut() - Bind soft reset device as child of clock device
|
||||
* using dedicated RK3576 lookup table
|
||||
*
|
||||
* @pdev: clock udevice
|
||||
* @reg_offset: the first offset in cru for softreset registers
|
||||
* @reg_number: the reg numbers of softreset registers
|
||||
* Return: 0 success, or error value
|
||||
*/
|
||||
int rk3576_reset_bind_lut(struct udevice *pdev, u32 reg_offset, u32 reg_number);
|
||||
/*
|
||||
* rk3588_reset_bind_lut() - Bind soft reset device as child of clock device
|
||||
* using dedicated RK3588 lookup table
|
||||
|
Reference in New Issue
Block a user