From: AngeloGioacchino Del Regno Date: Mon, 24 Nov 2025 11:06:53 +0000 (+0100) Subject: soc: mediatek: mtk-dvfsrc: Change error check for DVFSRCv4 START cmd X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23f1b4922a9135515e37d3bbad766e311845071f;p=thirdparty%2Fkernel%2Flinux.git soc: mediatek: mtk-dvfsrc: Change error check for DVFSRCv4 START cmd In preparation for adding support for DVFSRC Version 4, change the error check for the MTK_SIP_DVFSRC_START command in the probe function to error out only if BIT(0) is set: this is still valid for the previous DVFSRC versions, as those always set this bit in a fail reply anyway. Signed-off-by: Nicolas Frattaroli Signed-off-by: AngeloGioacchino Del Regno --- diff --git a/drivers/soc/mediatek/mtk-dvfsrc.c b/drivers/soc/mediatek/mtk-dvfsrc.c index 41add5636b03c..7708b07ab2d64 100644 --- a/drivers/soc/mediatek/mtk-dvfsrc.c +++ b/drivers/soc/mediatek/mtk-dvfsrc.c @@ -440,7 +440,7 @@ static int mtk_dvfsrc_probe(struct platform_device *pdev) /* Everything is set up - make it run! */ arm_smccc_smc(MTK_SIP_DVFSRC_VCOREFS_CONTROL, MTK_SIP_DVFSRC_START, 0, 0, 0, 0, 0, 0, &ares); - if (ares.a0) + if (ares.a0 & BIT(0)) return dev_err_probe(&pdev->dev, -EINVAL, "Cannot start DVFSRC: %lu\n", ares.a0); return 0;