[PATCH 2/3] thermal: qoriq_thermal: only enable supported sensors

Daniel Lezcano daniel.lezcano at linaro.org
Thu Jun 15 06:49:48 PDT 2023


On 15/06/2023 14:07, Peng Fan wrote:

[ ... ]

> Per i.MX8MQ Reference manual:
> MSITE:
> Monitoring site select 0 - 2. By setting the select bit for a temperature sensor site,
>   it is enabled and included in all monitoring functions. For proper operation, this
> field should only change when monitoring is
> disabled. If no site is selected, site 0 is monitored by default.
> 
> ME: Before enabling the TMU for monitoring, the TMU must be configured,
> see section Initialization Information. Failure to properly initialize the
> configuration table may result in boundedly undefined
> behavior.
> 
> So we must set the SITEs bits before enabling ME bit. So set TMR_ME when
> each time call invoke mode violates the spec.
> 
> As I understand, change_mode is per zone, which means per msite for TMU,
> but TMU_ME is a global gating bit which should not be set before all msites
> are set.

Mmh, IIUC correctly the documentation, it says the monitoring must be 
disabled when changing the sites. So in the proposed code, we shall 
disable the TMU, update the site and then enable the TMU.

Can you give a try to see if that works? If yes, then can you submit a 
patch on top of this series. Meanwhile, I'll pick those changes.

Thanks
   -- Daniel


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog




More information about the linux-arm-kernel mailing list