Changeset 4282
- Timestamp:
- 01/06/07 11:55:02 (6 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 3 modified
-
CHANGES (modified) (1 diff)
-
prog/hotplug/README.p4b (modified) (2 diffs)
-
prog/hotplug/p4b_smbus.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r4281 r4282 20 20 Fix fragile structure initialization 21 21 Module i2c-i801: Add ICH9 support 22 Module p4b_smbus: Add support for the ICH5 22 23 Module f71805f: Fix the device address decoding (2.6 backport) 23 24 Module icspll: Delete. It was useless and dangerous. -
lm-sensors/trunk/prog/hotplug/README.p4b
r2973 r4282 14 14 It works by turning on the SMBus PCI device. 15 15 It is implemented as a module, p4b_smbus.o. 16 It only works with the ICH2 (82801BA) and ICH4 (82801DB). 16 It works with the following chips: 17 * ICH2 (82801BA) 18 * ICH2-M (82801BAM) 19 * ICH4 (82801DB) 20 * ICH4-M (82801DBM) 21 * ICH5 (82801EB) 17 22 18 ASUS switches off the SMBus PCI Device 19 in the i801 ICH2/4 chip. I spoke two times 23 ASUS switches off the SMBus PCI Device in the i801 ICH chip. I spoke twice 20 24 with the German support and learned that: "We do not want the users to be 21 25 irritated by just another PCI Device in the Win98 device manager." 22 26 Really funny :-). 23 27 24 NOTE: We have a report that as of kernel 2.4.23, the kernel activates 25 the SMBus PCI device, so that this module is not required. 28 NOTE: As of kernel 2.4.23, the kernel activates the SMBus PCI device 29 on the following boards: 30 * Asus P4B 31 * Asus P4B533 32 * Asus P4PE 33 * Asus P4T533 34 * Asus P4G8X Deluxe 35 So this module is no longer required for these boards. For the other 36 affected boards, it still is. 26 37 27 38 … … 55 66 --------------------------------- 56 67 57 - Obviously a board with Intel i801BA/DB ICH2/4 with broken bios.68 - Obviously a board with Intel i801BA/DB/EB ICH2/4/5 with broken BIOS. 58 69 - A linux working with a 2.4 kernel AND hotplug support in it! 59 70 - A installed kernel tree and gcc. -
lm-sensors/trunk/prog/hotplug/p4b_smbus.c
r2459 r4282 2 2 * p4b_smbus.c 3 3 * 4 * Initialize the SMBus device on ICH2/2-M/4/4-M (82801BA/BAM/DB/DBM)4 * Initialize the SMBus device on ICH2/2-M/4/4-M/5 (82801BA/BAM/DB/DBM/EB) 5 5 */ 6 6 /* … … 45 45 * Apr 13, 2004, modified for ICH4-M (82801DBM) -- Axel Thimm <Axel.Thimm@ATrpms.net> 46 46 * bugfix: register F2/bit 8 on ICH2* is bit 0 on ICH4* 47 * 48 * Jan 6, 2007, added support for the ICH5 -- Jean Delvare 47 49 */ 48 50 … … 98 100 #define ICH4_SMBUS 0x24c3 99 101 102 #define ICH5 0x24d0 103 #define ICH5_SMBUS 0x24d3 104 105 #define is_supported_smbus(id) \ 106 ((id) == ICH2_SMBUS || \ 107 (id) == ICH4_SMBUS || \ 108 (id) == ICH5_SMBUS) 109 100 110 /* status, used to indicate that io space needs to be freed */ 101 111 static struct pci_dev *i801smbus = NULL; … … 115 125 * Bit 3: Disables SMBus Host Controller function. 116 126 * Bit 0: allows SMBus I/O space to be accessible when Bit 3 is set. 127 * ICH5: PCI-Device 0x8086:0x24d0 128 * Same as ICH4. 117 129 */ 118 130 static int … … 165 177 (*i801smbus)->devfn = devfn; 166 178 ret = pci_read_config_word(*i801smbus, PCI_DEVICE_ID, &id); 167 if (ret == 0 && (ICH2_SMBUS == id || ICH4_SMBUS ==id)) {179 if (ret == 0 && is_supported_smbus(id)) { 168 180 pci_read_config_word(*i801smbus, PCI_VENDOR_ID, &vid); 169 181 if(vid == 0x8086) … … 171 183 } 172 184 } 173 if (! (ICH2_SMBUS == id || ICH4_SMBUS ==id)) {185 if (!is_supported_smbus(id)) { 174 186 DBG("i801smbus: i801smbus not found although i801 present - strange.\n"); 175 187 return -EACCES; … … 224 236 } 225 237 238 dev = pci_find_device(0x8086, ICH5_SMBUS, NULL); 239 240 if (dev) 241 { 242 printk("i801smbus: SMBus already active\n"); 243 return -EPERM; 244 } 245 226 246 /* Are we operating a i801 chipset */ 227 247 if ((dev = pci_find_device(0x8086, ICH2, NULL)) != 0) … … 249 269 mask = 0xfff6; 250 270 } 271 else if ((dev = pci_find_device(0x8086, ICH5, NULL)) != 0) 272 { 273 printk(KERN_INFO "i801smbus: Found Intel ICH5 (82801EB)\n"); 274 testmask = 0x008; 275 mask = 0xfff6; 276 } 251 277 else 252 278 { 253 printk("i801smbus: INTEL ICH2/2-M/4/4-M (82801BA/BAM/DB/DBM) not found.\n"); 279 printk(KERN_NOTICE "i801smbus: No supported Intel ICH (82801) " 280 "chip found\n"); 254 281 return -ENODEV ; 255 282 } … … 312 339 313 340 #endif /* MODULE */ 314 315 316 317 318 319 320 321 322 323
