Changeset 943
- Timestamp:
- 12/14/00 01:26:13 (12 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 3 modified
-
CHANGES (modified) (1 diff)
-
kernel/busses/i2c-sis5595.c (modified) (3 diffs)
-
kernel/chips/sis5595.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r941 r943 32 32 Module mtp008: new 33 33 Module pcf8574: change update time to 5 seconds 34 Modules sis5595, i2c-sis5595: Check for uninitialized base addresses 34 35 Module w83781d: fix beep setting via /proc 35 36 Program mkpatch.pl: more fixes -
lm-sensors/trunk/kernel/busses/i2c-sis5595.c
r838 r943 163 163 /* Determine the address of the SMBus areas */ 164 164 pci_read_config_word(SIS5595_dev, ACPI_BASE, &sis5595_base); 165 if(sis5595_base == 0) { 166 printk("i2c-sis5595.o: ACPI base address uninitialized - upgrade BIOS?\n"); 167 error_return = -ENODEV; 168 goto END; 169 } 170 165 171 #ifdef DEBUG 166 172 printk("ACPI Base address: %04x\n", sis5595_base); … … 170 176 if (check_region(sis5595_base + SMB_INDEX, 2)) { 171 177 printk 172 ("i2c-sis5595.o: SMBus registers 0x% 4x-0x%4x already in use!\n",178 ("i2c-sis5595.o: SMBus registers 0x%04x-0x%04x already in use!\n", 173 179 sis5595_base + SMB_INDEX, 174 180 sis5595_base + SMB_INDEX + 1); … … 374 380 { 375 381 int res; 376 printk(" sis5595.o version %s (%s)\n", LM_VERSION, LM_DATE);382 printk("i2c-sis5595.o version %s (%s)\n", LM_VERSION, LM_DATE); 377 383 #ifdef DEBUG 378 384 /* PE- It might be good to make this a permanent part of the code! */ -
lm-sensors/trunk/kernel/chips/sis5595.c
r933 r943 68 68 #define SIS5595_EXTENT 8 69 69 #define SIS5595_BASE_REG 0x68 70 #define SIS5595_ENABLE_REG 0x7B 70 71 71 72 /* Where are the ISA address/data registers relative to the base address */ … … 278 279 struct pci_dev *s_bridge; 279 280 u16 val; 281 char c; 280 282 281 283 if (!pci_present()) 282 284 return -ENODEV; 283 285 284 if (! 285 (s_bridge = 286 pci_find_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, 286 if (!(s_bridge = 287 pci_find_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, 287 288 NULL))) 288 289 289 return -ENODEV; 290 290 … … 295 295 296 296 *address = (val & 0xfff8); 297 if(*address == 0) { 298 printk("sis5595.o: Sensor base address uninitialized - upgrade BIOS?\n"); 299 return -ENODEV; 300 } 301 302 if (PCIBIOS_SUCCESSFUL != 303 pci_read_config_byte(s_bridge, SIS5595_ENABLE_REG, &c)) 304 return -ENODEV; 305 if((c & 0x80) == 0) { 306 printk("sis5595.o: Sensors not enabled - upgrade BIOS?\n"); 307 return -ENODEV; 308 } 297 309 return 0; 298 310 } … … 470 482 471 483 472 /* The SMBus locks itself, but ISA access must be locked explicit ely!473 There are some ugly typecasts here, but the good new is - they should484 /* The SMBus locks itself, but ISA access must be locked explicitly! 485 There are some ugly typecasts here, but the good news is - they should 474 486 nowhere else be necessary! */ 475 487 int sis5595_read_value(struct i2c_client *client, u8 reg) … … 484 496 } 485 497 486 /* The SMBus locks itself, but ISA access muse be locked explicitely!487 There are some ugly typecasts here, but the good new is - they should488 nowhere else be necessary! */489 498 int sis5595_write_value(struct i2c_client *client, u8 reg, u8 value) 490 499 { … … 731 740 732 741 if (sis5595_find_sis(&addr)) { 733 normal_isa[0] = SENSORS_ISA_END; 734 printk 735 ("sis5595.o: Warning: No SIS5595 southbridge found!\n"); 736 } else 737 normal_isa[0] = addr; 742 printk("sis5595.o: SIS5595 not detected, module not inserted.\n"); 743 return -ENODEV; 744 } 745 normal_isa[0] = addr; 738 746 739 747 if ((res = i2c_add_driver(&sis5595_driver))) {
