Re: powermac fan control modules detection ...
Ccing debian-kernel for maks, and debian-boot for Frans, or whoever will
commit my patches.
On Mon, Oct 16, 2006 at 08:59:43AM +1000, Benjamin Herrenschmidt wrote:
> On Sun, 2006-10-15 at 12:16 +0200, Sven Luther wrote:
> > Hi, ...
> > I am working at integrating fan control into d-i and initramfs-tools.
> > For this, we currently use the following list of modules :
> > /lib/modules/2.6.17-2-powerpc64/kernel/drivers/macintosh/therm_pm72.ko
> > /lib/modules/2.6.17-2-powerpc64/kernel/drivers/macintosh/windfarm_core.ko
> > /lib/modules/2.6.17-2-powerpc64/kernel/drivers/macintosh/windfarm_cpufreq_clamp.ko
> > /lib/modules/2.6.17-2-powerpc64/kernel/drivers/macintosh/windfarm_lm75_sensor.ko
> > /lib/modules/2.6.17-2-powerpc64/kernel/drivers/macintosh/windfarm_max6690_sensor.ko
> > /lib/modules/2.6.17-2-powerpc64/kernel/drivers/macintosh/windfarm_pid.ko
> > /lib/modules/2.6.17-2-powerpc64/kernel/drivers/macintosh/windfarm_pm112.ko
> > /lib/modules/2.6.17-2-powerpc64/kernel/drivers/macintosh/windfarm_pm81.ko
> > /lib/modules/2.6.17-2-powerpc64/kernel/drivers/macintosh/windfarm_pm91.ko
> > /lib/modules/2.6.17-2-powerpc64/kernel/drivers/macintosh/windfarm_smu_controls.ko
> > /lib/modules/2.6.17-2-powerpc64/kernel/drivers/macintosh/windfarm_smu_sat.ko
> > /lib/modules/2.6.17-2-powerpc64/kernel/drivers/macintosh/windfarm_smu_sensors.ko
> > /lib/modules/2.6.17-2-powerpc64/kernel/drivers/i2c/busses/i2c-powermac.ko
> > I wonder if anyone is missing.
> > Benh, am i right in thinking that those modules are only needed for 64bit
> > powermac hardware ?
> i2c-powermac.ko is also useful for various other things on 32 bits. All
> the other ones in your list are indeed 64 bits only.
Ok. I also saw there where two such modules existing in the 32bit case. I get :
$ ls /lib/modules/2.6.17-2-powerpc/kernel/drivers/macintosh/
ans-lcd.ko apm_emu.ko therm_adt746x.ko therm_windtunnel.ko windfarm_core.ko
Does windfarm_core make sense to build on 32bit ? I suppose we can load
adt746x and windtunnel, what about the other two ?
> You also need to make sure cpufreq_64 is enabled for them to work.
So, i should add some of the below modules :
And also load them ? Maybe write something to /sys/.../cpufreq too.
> > Also, i wonder if there is some way for detecting which machine needs which
> > module ? Some /proc/device-tree parsing ? Or maybe simply a /proc/cpuinfo
> > model matrix ?
> i2c-powermac.ko : should pretty much be built-in
Well, it is not all that needed on IBM or genesi hardware for example.
> Then, it depends on the machine. The "main" modules tend to auto-load
> the other ones, but there is a bug where it misses
> windfarm_cpufreq_clamp. and windfarm_pm112 blatantly "forgets" to
> autoload anything. So the rule is:
> Machine type:
> - PowerMac7,2, PowerMac7,3, RackMac3,1: therm_pm72
> - PowerMac8,1, PowerMac8,2: windfarm_pm81 + windfarm_cpufreq_clamp
> - PowerMac9,1: windfarm_pm91 + windfarm_cpufreq_clamp
> - PowerMac11,2: windfarm_pm112 + windfarm_cpufreq_clamp +
> windfarm_smu_sat + windfarm_smu_sensors + windfarm_smu_controls +
> windfarm_max6690_sensor.ko + windfarm_lm75_sensor.ko
> - PowerMac12,1: <no thermal control yet> (iMac G5 + iSight, I welcome
> somebody in australia giving me hardware access to one for a week or two
> to fix that).
> I'll do some patches to fix autoloading of sub-modules so that only the
> "main" one is needed.
Ok, but in the meantime, we will work from the above list.