[PATCH] pmdomain: rockchip: Check if smcc could be handled by TA
Heiko Stübner
heiko at sntech.de
Wed Feb 19 00:17:24 PST 2025
Am Mittwoch, 19. Februar 2025, 01:58:09 MEZ schrieb Shawn Lin:
> Non-existent trusted-firmware could lead smcc calls into some
> unset location which breaks the system.
>
> Reported-by: Steven Price <steven.price at arm.com>
> Cc: Steven Price <steven.price at arm.com>
> Suggested-by: Heiko Stuebner <heiko at sntech.de>
> Fixes: 58ebba35ddab ("pmdomain: rockchip: Add smc call to inform firmware")
> Signed-off-by: Shawn Lin <shawn.lin at rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko at sntech.de>
> ---
> Hi Ulf, this's a follow-up patch fixing the issue Steven saw.
>
> drivers/pmdomain/rockchip/pm-domains.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pmdomain/rockchip/pm-domains.c b/drivers/pmdomain/rockchip/pm-domains.c
> index 49842f1..27a5c68 100644
> --- a/drivers/pmdomain/rockchip/pm-domains.c
> +++ b/drivers/pmdomain/rockchip/pm-domains.c
> @@ -572,9 +572,10 @@ static void rockchip_do_pmu_set_power_domain(struct rockchip_pm_domain *pd,
> }
>
> /* Inform firmware to keep this pd on or off */
> - arm_smccc_smc(ROCKCHIP_SIP_SUSPEND_MODE, ROCKCHIP_SLEEP_PD_CONFIG,
> - pmu->info->pwr_offset + pd_pwr_offset,
> - pd->info->pwr_mask, on, 0, 0, 0, &res);
> + if (arm_smccc_1_1_get_conduit() != SMCCC_CONDUIT_NONE)
> + arm_smccc_smc(ROCKCHIP_SIP_SUSPEND_MODE, ROCKCHIP_SLEEP_PD_CONFIG,
> + pmu->info->pwr_offset + pd_pwr_offset,
> + pd->info->pwr_mask, on, 0, 0, 0, &res);
> }
>
> static int rockchip_pd_power(struct rockchip_pm_domain *pd, bool power_on)
>
More information about the Linux-rockchip
mailing list