]> git.itanic.dy.fi Git - linux-stable/commit
thermal/drivers/qoriq: Fix getting tmu range
authorPeng Fan <peng.fan@nxp.com>
Mon, 26 Feb 2024 00:36:57 +0000 (08:36 +0800)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:17:31 +0000 (18:17 -0400)
commit62fda5c8d3444f1da9b66934a5a8692e13d55d41
tree821b8e148bcb03c29064034c67b8d75b4312d300
parent9b02197596671800dd934609384b1aca7c6ad218
thermal/drivers/qoriq: Fix getting tmu range

[ Upstream commit 4d0642074c67ed9928e9d68734ace439aa06e403 ]

TMU Version 1 has 4 TTRCRs, while TMU Version >=2 has 16 TTRCRs.
So limit the len to 4 will report "invalid range data" for i.MX93.

This patch drop the local array with allocated ttrcr array and
able to support larger tmu ranges.

Fixes: f12d60c81fce ("thermal/drivers/qoriq: Support version 2.1")
Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20240226003657.3012880-1-peng.fan@oss.nxp.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/qoriq_thermal.c