Configure the number of sites (sensors) based on SoC.
This work was based on mmel's initial work at:
https://github.com/strejda/freebsd/commit/914e3f0098b090cb5c1492b0d24992012c5c553b
MFC after: 2 weeks
Differential D35759
arm64, qoriq_therm: configure the number of sites base don SoC bz on Jul 9 2022, 12:33 AM. Authored by Tags None Referenced Files
Details Configure the number of sites (sensors) based on SoC. MFC after: 2 weeks Tested on Ten64 (LS1088): soctherm0: <QorIQ temperature sensors> mem 0x1f80000-0x1f8ffff irq 6 on simplebus0 soctherm0: Found thermal sensor #0 site0: 'core-cluster' soctherm0: Found thermal sensor #1 site1: 'soc' # sysctl -N hw.temperature hw.temperature.core-cluster hw.temperature.soc The real problem that made me look is that reading times out but I figured leaving
Diff Detail
Event Timeline
Comment Actions Replace a hardcoded 7 likely coming from LX2160a (0..6) with the number of sites we discovered. Comment Actions I'm so sorry, but NACK. I have a piece ready to implement general thermal sensors and a thermal zone framework (including power/clock management), but I don't have time to finish it right now. Comment Actions I understand but with the lack of the framework to do it the other way round made me creative enough as the multiple timeouts for reading the other sensors are quite annoying. And frankly, we do so in nvidia as well I thought (but maybe I am wrong).
So building up an array per Soc would be better even if the information is already duplicated in device tree (just the other way round)?
YEAH! Well, let's go for that then; I'll have a look. Thanks! Comment Actions Taking this step-by-step. I went ahead and 1st used This seems to be the path of least resistance for the moment until we'll have the full framework. If this is okay, I'll also update D35764. |