soc: rockchip: power-domain: Add memory reset support for rk3576

This fixes panic when pd power on.
rockchip-pm-domain 27380000.power-management:power-controller: failed to set domain 'nputop', target_on= 1, val=0
Kernel panic - not syncing: panic_on_set_domain set ...
Call trace:
dump_backtrace+0xf4/0x114
show_stack+0x18/0x24
dump_stack_lvl+0x6c/0x90
dump_stack+0x18/0x38
panic+0x14c/0x338
rockchip_do_pmu_set_power_domain+0x640/0x644
rockchip_pd_power+0x154/0x350
rockchip_pd_power_on+0x24/0x30
genpd_power_on+0x1d4/0x2ec
genpd_power_on+0x7c/0x2ec
genpd_runtime_resume+0xb0/0x384
__rpm_callback+0x7c/0x3c4
rpm_resume+0x43c/0x678
__pm_runtime_resume+0x4c/0x90
rknpu_power_on+0xa0/0x2d8
__rknpu_action_ioctl+0x54/0x230
drm_ioctl_kernel+0x80/0xf8
drm_ioctl+0x2d4/0x554
__arm64_sys_ioctl+0x90/0xc8
invoke_syscall+0x40/0x104
el0_svc_common+0xbc/0x168
do_el0_svc+0x1c/0x28
el0_svc+0x1c/0x68
el0t_64_sync_handler+0x68/0xb4
el0t_64_sync+0x164/0x168

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ic73413d48335ef6bc57f3793ba6e3b39d4ecd100
This commit is contained in:
Finley Xiao
2024-05-14 17:40:24 +08:00
committed by Tao Huang
parent d73c871ae7
commit feb16e5db3

View File

@@ -341,6 +341,7 @@ static void rockchip_pmu_unlock(struct rockchip_pm_domain *pd)
.pwr_w_mask = (pwr) << 16, \
.pwr_mask = (pwr), \
.status_mask = (status), \
.mem_status_mask = (r_status), \
.repair_status_mask = (r_status), \
.req_offset = r_offset, \
.req_w_mask = (req) << 16, \
@@ -2287,6 +2288,9 @@ static const struct rockchip_pmu_info rk3568_pmu = {
static const struct rockchip_pmu_info rk3576_pmu = {
.pwr_offset = 0x210,
.status_offset = 0x230,
.chain_status_offset = 0x248,
.mem_status_offset = 0x250,
.mem_pwr_offset = 0x300,
.req_offset = 0x110,
.idle_offset = 0x128,
.ack_offset = 0x120,