* [PATCH] thermal: exynos: fix masking value for artpec7 temp_error [not found] ` <CGME20220330093842epcas2p11a4e220245298c5729e4a37d1484d4d5@epcms2p3> @ 2022-03-30 9:43 ` Sang Min Kim 0 siblings, 0 replies; 4+ messages in thread From: Sang Min Kim @ 2022-03-30 9:43 UTC (permalink / raw) To: bzolnier, krzk, rafael, daniel.lezcano, amitk, rui.zhang, ALIM AKHTAR Cc: linux-pm, linux-samsung-soc, linux-arm-kernel, linux-kernel This patch is a modification related to masking of the temp_error value in the sanitize_temp_error() function. For SOC_ARCH_EXYNOS7, the temp_error1, 2 value should be masked as EXYNOS7_TMU_TEMP_MASK(0x1ff). The current code masks temp_error2 with EXYNOS_TMU_TEMP_MASK(0xff) value even in the case of EXYNOS7. In addition, when entering the if statement, both temp_error1 and 2 are masked with EXYNOS_TMU_TEMP_MASK(0xff). By modifying to use the previously declared local variable tmu_temp_mask, the mask value suitable for the SOC can be applied. Signed-off-by: sangmin kim <hypmean.kim@samsung.com> --- drivers/thermal/samsung/exynos_tmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index f4ab4c5..08c63fe 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -243,17 +243,17 @@ static void sanitize_temp_error(struct exynos_tmu_data *data, u32 trim_info) data->temp_error1 = trim_info & tmu_temp_mask; data->temp_error2 = ((trim_info >> EXYNOS_TRIMINFO_85_SHIFT) & - EXYNOS_TMU_TEMP_MASK); + tmu_temp_mask); if (!data->temp_error1 || (data->min_efuse_value > data->temp_error1) || (data->temp_error1 > data->max_efuse_value)) - data->temp_error1 = data->efuse_value & EXYNOS_TMU_TEMP_MASK; + data->temp_error1 = data->efuse_value & tmu_temp_mask; if (!data->temp_error2) data->temp_error2 = (data->efuse_value >> EXYNOS_TRIMINFO_85_SHIFT) & - EXYNOS_TMU_TEMP_MASK; + tmu_temp_mask; } static int exynos_tmu_initialize(struct platform_device *pdev) -- 2.9.5 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] thermal: exynos: fix masking value for artpec7 temp_error @ 2022-03-30 9:43 ` Sang Min Kim 0 siblings, 0 replies; 4+ messages in thread From: Sang Min Kim @ 2022-03-30 9:43 UTC (permalink / raw) To: bzolnier, krzk, rafael, daniel.lezcano, amitk, rui.zhang, ALIM AKHTAR Cc: linux-pm, linux-samsung-soc, linux-arm-kernel, linux-kernel This patch is a modification related to masking of the temp_error value in the sanitize_temp_error() function. For SOC_ARCH_EXYNOS7, the temp_error1, 2 value should be masked as EXYNOS7_TMU_TEMP_MASK(0x1ff). The current code masks temp_error2 with EXYNOS_TMU_TEMP_MASK(0xff) value even in the case of EXYNOS7. In addition, when entering the if statement, both temp_error1 and 2 are masked with EXYNOS_TMU_TEMP_MASK(0xff). By modifying to use the previously declared local variable tmu_temp_mask, the mask value suitable for the SOC can be applied. Signed-off-by: sangmin kim <hypmean.kim@samsung.com> --- drivers/thermal/samsung/exynos_tmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index f4ab4c5..08c63fe 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -243,17 +243,17 @@ static void sanitize_temp_error(struct exynos_tmu_data *data, u32 trim_info) data->temp_error1 = trim_info & tmu_temp_mask; data->temp_error2 = ((trim_info >> EXYNOS_TRIMINFO_85_SHIFT) & - EXYNOS_TMU_TEMP_MASK); + tmu_temp_mask); if (!data->temp_error1 || (data->min_efuse_value > data->temp_error1) || (data->temp_error1 > data->max_efuse_value)) - data->temp_error1 = data->efuse_value & EXYNOS_TMU_TEMP_MASK; + data->temp_error1 = data->efuse_value & tmu_temp_mask; if (!data->temp_error2) data->temp_error2 = (data->efuse_value >> EXYNOS_TRIMINFO_85_SHIFT) & - EXYNOS_TMU_TEMP_MASK; + tmu_temp_mask; } static int exynos_tmu_initialize(struct platform_device *pdev) -- 2.9.5 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] thermal: exynos: fix masking value for artpec7 temp_error 2022-03-30 9:43 ` Sang Min Kim @ 2022-03-30 17:05 ` Krzysztof Kozlowski -1 siblings, 0 replies; 4+ messages in thread From: Krzysztof Kozlowski @ 2022-03-30 17:05 UTC (permalink / raw) To: hypmean.kim, bzolnier, krzk, rafael, daniel.lezcano, amitk, rui.zhang, ALIM AKHTAR Cc: linux-pm, linux-samsung-soc, linux-arm-kernel, linux-kernel On 30/03/2022 11:43, Sang Min Kim wrote: > This patch is a modification related to masking of the temp_error value > in the sanitize_temp_error() function. Don't use "This patch" please. https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95 > > For SOC_ARCH_EXYNOS7, the temp_error1, 2 value should be masked as > EXYNOS7_TMU_TEMP_MASK(0x1ff). > The current code masks temp_error2 with EXYNOS_TMU_TEMP_MASK(0xff) > value even in the case of EXYNOS7. > In addition, when entering the if statement, both temp_error1 and 2 > are masked with EXYNOS_TMU_TEMP_MASK(0xff). > > By modifying to use the previously declared local variable tmu_temp_mask, > the mask value suitable for the SOC can be applied. > > Signed-off-by: sangmin kim <hypmean.kim@samsung.com> Fixes tag? Code looks itself good, so with changes above: Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] thermal: exynos: fix masking value for artpec7 temp_error @ 2022-03-30 17:05 ` Krzysztof Kozlowski 0 siblings, 0 replies; 4+ messages in thread From: Krzysztof Kozlowski @ 2022-03-30 17:05 UTC (permalink / raw) To: hypmean.kim, bzolnier, krzk, rafael, daniel.lezcano, amitk, rui.zhang, ALIM AKHTAR Cc: linux-pm, linux-samsung-soc, linux-arm-kernel, linux-kernel On 30/03/2022 11:43, Sang Min Kim wrote: > This patch is a modification related to masking of the temp_error value > in the sanitize_temp_error() function. Don't use "This patch" please. https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95 > > For SOC_ARCH_EXYNOS7, the temp_error1, 2 value should be masked as > EXYNOS7_TMU_TEMP_MASK(0x1ff). > The current code masks temp_error2 with EXYNOS_TMU_TEMP_MASK(0xff) > value even in the case of EXYNOS7. > In addition, when entering the if statement, both temp_error1 and 2 > are masked with EXYNOS_TMU_TEMP_MASK(0xff). > > By modifying to use the previously declared local variable tmu_temp_mask, > the mask value suitable for the SOC can be applied. > > Signed-off-by: sangmin kim <hypmean.kim@samsung.com> Fixes tag? Code looks itself good, so with changes above: Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-03-30 17:07 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20220330093905.191315-1-hypmean.kim@samsung.com> [not found] ` <CGME20220330093842epcas2p11a4e220245298c5729e4a37d1484d4d5@epcms2p3> 2022-03-30 9:43 ` [PATCH] thermal: exynos: fix masking value for artpec7 temp_error Sang Min Kim 2022-03-30 9:43 ` Sang Min Kim 2022-03-30 17:05 ` Krzysztof Kozlowski 2022-03-30 17:05 ` Krzysztof Kozlowski
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.