Add the unhide_ICH_SMBus script

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4283 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Rudolf Marek committed 2007-01-06 22:18:39 +00:00
1 parent dc9d483940
commit d43c1d23bd
5 files changed
+77 -22

No files matched your search

+2
View File
@@ -25,6 +25,8 @@ SVN HEAD
Program eepromer: Fix loads of warnings
Program i2cdetect: Make the output clearer
Program py-smbus: New! Python i2c-dev bindings (prog/py-smbus)
Program unhide_ICH_SMBus: New! Unhides the ICH SMBus even for 2.6 kernels
without need of recompilation.
Programs dump/*: More robust handling of user inputs
Programs pwmconfig, fancontrol: Handle write errors for bash 3.1
Program sensord: Add pc87247 support (fans only)
+3
View File
@@ -90,6 +90,9 @@ see useful_addresses.html.
on Asus P4B boards.
See prog/hotplug/README.p4b for details.
* prog/hotplug/unhide_ICH_SMBus (shell script, not installed)
It unhides the ICH Intel SMBus for 2.6 kernels
* prog/init/lm_sensors.init (shell script, not installed)
A SysV init script to be installed in /etc/rc.d/init.d/
It inserts the bus and chip modules.
+12 -10
View File
@@ -1,14 +1,16 @@
M7101 - SMBus Support for ALi M15x3 based motherboards.
For Asus P4B motherboards, use the p4b_smbus module;
see the file README.p4b.
Files in this directory:
NOTE:
This module is for 2.4 kernels only. For 2.6 kernels,
activation is handled by the code in drivers/pci/quirks.c
in the kernel source. If you have the latest 2.6 kernel and
the quirks code does not activate your SMBus, try adding support
in quirks.c, recompile and test your new kernel, and then
submit a patch to us. Contact us if you need assistance.
* m7101.c
M7101 - SMBus Support for ALi M15x3 based motherboards.
* README.p4b
More detailed information for files below.
* p4b_smbus.c
2.4 Kernel module which unhides the bus for ASUS boards.
* unhide_ICH_SMBus
Script which unhides the bus for 2.6 kernel.
--------------------------------------------------------
Quick Start (2.4 kernels only):
+21 -12
View File
@@ -1,18 +1,10 @@
What is it?
-----------
NOTE:
This module is for 2.4 kernels only. For 2.6 kernels,
activation is handled by the code in drivers/pci/quirks.c
in the kernel source. If you have the latest 2.6 kernel and
the quirks code does not activate your SMBus, try adding support
in quirks.c, recompile and test your new kernel, and then
submit a patch to us. Contact us if you need assistance.
It unhides the SMBus of Intel ICH southbridges hidden
on ASUS P4B series. It is implemented as a module (p4b_smbus.o),
or a shell script for the 2.6 kernel (unhide_ICH_SMBus).
This is just a quick and dirty hack to get the hardware monitoring working
on the ASUS P4B board under Linux.
It works by turning on the SMBus PCI device.
It is implemented as a module, p4b_smbus.o.
It works with the following chips:
* ICH2 (82801BA)
* ICH2-M (82801BAM)
@@ -25,6 +17,24 @@ with the German support and learned that: "We do not want the users to be
irritated by just another PCI Device in the Win98 device manager."
Really funny :-).
This module is for 2.4 kernels only. For 2.6 kernels, activation is
handled by the code in drivers/pci/quirks.c in the kernel source. If you
have the 2.6 kernel and the quirks code does not activate your SMBus,
you may:
* check if you have kernel version from 2.6.17 to 2.6.19
If so you, need to disable ACPI sleep support and recompile kernel.
If you don't use suspend try below instead of recompilation.
* run as root the ./unhide_ICH_SMBus script. It will unhide the bus
and load the i2c-i801 driver.
* if above script works and you have latest kernel, you may
try to fix the quirks.c, recompile and test your new kernel,
and then submit a patch to us. Contact us if you need assistance.
Information for 2.4 users continues below.
NOTE: As of kernel 2.4.23, the kernel activates the SMBus PCI device
on the following boards:
* Asus P4B
@@ -35,7 +45,6 @@ on the following boards:
So this module is no longer required for these boards. For the other
affected boards, it still is.
What does the module do?
------------------------
(Note: the following instructions assume the ICH2. For the ICH4,
+39
View File
@@ -0,0 +1,39 @@
#!/bin/bash
# (C) Rudolf Marek <r.marek@assembler.cz>,
# Jean Delvare <khali@linux-fr.org>
#
# Thanks Jean Delvare and Oliver Dreier <oliver@dinux.de> for testing.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation
pcibus="/sys/bus/pci/slots/"
device="00:1f"
intel=`lspci -n -s $device.0 | grep 8086`
if [ -z "$intel" ] ; then
echo "Not for your chipset - Intel (ICH) only"
exit 255;
fi
modprobe fakephp &> /dev/null
if [ ! -d "$pcibus" ] ; then
echo "You need the fake PCI hotplug driver! (fakephp.ko and 2.6 kernel)"
exit 255;
fi
echo "Enabling SMBus PCI device ..."
newval=$( printf '%x' $((0x$(setpci -s $device.0 f2.w) & 0xfff7)))
setpci -s $device.0 f2.w=$newval
echo "Rescanning the bus ..."
echo 1 > $pcibus/0000:$device.0/power 2>/dev/null
if [ ! -d "$pcibus/0000:$device.3" ] ; then
echo "Failed to enable the SMBUS"
exit 253;
fi
echo "Done, loading i2c-i801 ..."
modprobe i2c-i801 &> /dev/null