Changeset 300
- Timestamp:
- 03/10/99 01:10:42 (10 years ago)
- Files:
-
- lm-sensors/trunk/kernel/busses/i2c-ali15x3.c (modified) (21 diffs)
- lm-sensors/trunk/kernel/busses/i2c-isa.c (modified) (9 diffs)
- lm-sensors/trunk/kernel/busses/i2c-piix4.c (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/kernel/busses/i2c-ali15x3.c
r247 r300 184 184 /* First check whether we can access PCI at all */ 185 185 if (pci_present() == 0) { 186 printk(" ali15x3.o: Error: No PCI-bus found!\n");186 printk("i2c-ali15x3.o: Error: No PCI-bus found!\n"); 187 187 error_return=-ENODEV; 188 188 goto END; … … 202 202 if (res) { 203 203 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54) */ 204 printk(" ali15x3.o: Error: Can't detect ali15x3!\n");204 printk("i2c-ali15x3.o: Error: Can't detect ali15x3!\n"); 205 205 error_return=-ENODEV; 206 206 goto END; … … 233 233 ali15x3_acpia &= (0xffff & ~ (ALI15X3_ACPI_IOSIZE - 1)); 234 234 if(ali15x3_acpia == 0) { 235 printk(" ali15x3.o: ALI15X3_acpi region uninitialized - upgrade BIOS?\n");235 printk("i2c-ali15x3.o: ALI15X3_acpi region uninitialized - upgrade BIOS?\n"); 236 236 error_return=-ENODEV; 237 237 } … … 242 242 ali15x3_smba &= (0xffff & ~ (ALI15X3_SMB_IOSIZE - 1)); 243 243 if(ali15x3_smba == 0) { 244 printk(" ali15x3.o: ALI15X3_smb region uninitialized - upgrade BIOS?\n");244 printk("i2c-ali15x3.o: ALI15X3_smb region uninitialized - upgrade BIOS?\n"); 245 245 error_return=-ENODEV; 246 246 } … … 251 251 #ifdef MAP_ACPI 252 252 if (check_region(ali15x3_acpia, ALI15X3_ACPI_IOSIZE)) { 253 printk(" ali15x3.o: ALI15X3_acpi region 0x%x already in use!\n", ali15x3_acpia);254 printk(" ali15x3.o: If conflicting ACPI software is installed, undefine MAP_ACPI and recompile!\n");253 printk("i2c-ali15x3.o: ALI15X3_acpi region 0x%x already in use!\n", ali15x3_acpia); 254 printk("i2c-ali15x3.o: If conflicting ACPI software is installed, undefine MAP_ACPI and recompile!\n"); 255 255 error_return=-ENODEV; 256 256 } … … 258 258 259 259 if (check_region(ali15x3_smba, ALI15X3_SMB_IOSIZE)) { 260 printk(" ali15x3.o: ALI15X3_smb region 0x%x already in use!\n", ali15x3_smba);260 printk("i2c-ali15x3.o: ALI15X3_smb region 0x%x already in use!\n", ali15x3_smba); 261 261 error_return=-ENODEV; 262 262 } … … 286 286 pci_write_config_byte_united(ALI15X3_dev, ALI15X3_bus, ALI15X3_devfn, 287 287 SMBHSTCFG, temp | 1); 288 printk(" ali15x3.0: WARNING: ALI15X3 SMBus interface has been FORCEFULLY "288 printk("i2c-ali15x3.o: WARNING: ALI15X3 SMBus interface has been FORCEFULLY " 289 289 "ENABLED!!\n"); 290 290 } … … 313 313 Don't bother with finding the 1533 device and reading the register. 314 314 if ((....... & 0x0F) == 1) 315 printk(" ali15x3.o: ALI15X3 using Interrupt 9 for SMBus.\n");315 printk("i2c-ali15x3.o: ALI15X3 using Interrupt 9 for SMBus.\n"); 316 316 */ 317 317 pci_read_config_byte_united(ALI15X3_dev, ALI15X3_bus, ALI15X3_devfn, SMBREV, 318 318 &temp); 319 printk(" ali15x3.o: SMBREV = 0x%X\n",temp);320 printk(" ali15x3.o: ALI15X3_smba = 0x%X\n",ali15x3_smba);319 printk("i2c-ali15x3.o: SMBREV = 0x%X\n",temp); 320 printk("i2c-ali15x3.o: ALI15X3_smba = 0x%X\n",ali15x3_smba); 321 321 #endif /* DEBUG */ 322 322 … … 341 341 342 342 #ifdef DEBUG 343 printk(" ali15x3.o: Transaction (pre): STS=%02x, CNT=%02x, CMD=%02x, ADD=%02x, DAT0=%02x, "343 printk("i2c-ali15x3.o: Transaction (pre): STS=%02x, CNT=%02x, CMD=%02x, ADD=%02x, DAT0=%02x, " 344 344 "DAT1=%02x\n", 345 345 inb_p(SMBHSTSTS), inb_p(SMBHSTCNT),inb_p(SMBHSTCMD),inb_p(SMBHSTADD),inb_p(SMBHSTDAT0), … … 368 368 /* 369 369 #ifdef DEBUG 370 printk(" ali15x3.o: Resetting host controller to clear busy condition\n",temp);370 printk("i2c-ali15x3.o: Resetting host controller to clear busy condition\n",temp); 371 371 #endif 372 372 outb_p(ALI15X3_ABORT, SMBHSTCNT); … … 381 381 If that's the case you are stuck. 382 382 */ 383 printk(" ali15x3.o: Resetting entire SMB Bus to clear busy condition (%02x)\n",temp);383 printk("i2c-ali15x3.o: Resetting entire SMB Bus to clear busy condition (%02x)\n",temp); 384 384 outb_p(ALI15X3_T_OUT, SMBHSTCNT); 385 385 temp = inb_p(SMBHSTSTS); … … 397 397 as one of the bits now appears to be stuck */ 398 398 /* This may be a bus or device with electrical problems. */ 399 printk(" ali15x3.o: SMBus reset failed! (0x%02x) - controller or device on bus is probably hung\n",temp);399 printk("i2c-ali15x3.o: SMBus reset failed! (0x%02x) - controller or device on bus is probably hung\n",temp); 400 400 return -1; 401 401 } … … 420 420 if (timeout >= MAX_TIMEOUT) { 421 421 result = -1; 422 printk(" ali15x3.o: SMBus Timeout!\n");422 printk("i2c-ali15x3.o: SMBus Timeout!\n"); 423 423 } 424 424 … … 426 426 result = -1; 427 427 #ifdef DEBUG 428 printk(" ali15x3.o: Error: Failed bus transaction\n");428 printk("i2c-ali15x3.o: Error: Failed bus transaction\n"); 429 429 #endif 430 430 } … … 439 439 result = -1; 440 440 #ifdef DEBUG 441 printk(" ali15x3.o: Error: no response or bus collision ADD=%02x\n", inb_p(SMBHSTADD));441 printk("i2c-ali15x3.o: Error: no response or bus collision ADD=%02x\n", inb_p(SMBHSTADD)); 442 442 #endif 443 443 } … … 446 446 if (temp & ALI15X3_STS_DEV) { 447 447 result = -1; 448 printk(" ali15x3.o: Error: device error\n");448 printk("i2c-ali15x3.o: Error: device error\n"); 449 449 } 450 450 451 451 #ifdef DEBUG 452 printk(" ali15x3.o: Transaction (post): STS=%02x, CNT=%02x, CMD=%02x, ADD=%02x, "452 printk("i2c-ali15x3.o: Transaction (post): STS=%02x, CNT=%02x, CMD=%02x, ADD=%02x, " 453 453 "DAT0=%02x, DAT1=%02x\n", 454 454 inb_p(SMBHSTSTS), inb_p(SMBHSTCNT),inb_p(SMBHSTCMD),inb_p(SMBHSTADD),inb_p(SMBHSTDAT0), … … 476 476 } 477 477 if (timeout >= MAX_TIMEOUT) { 478 printk(" ali15x3.o: Idle wait Timeout! STS=0x%02x\n", temp);478 printk("i2c-ali15x3.o: Idle wait Timeout! STS=0x%02x\n", temp); 479 479 } 480 480 481 481 switch(size) { 482 482 case SMBUS_PROC_CALL: 483 printk(" ali15x3.o: SMBUS_PROC_CALL not supported!\n");483 printk("i2c-ali15x3.o: SMBUS_PROC_CALL not supported!\n"); 484 484 return -1; 485 485 case SMBUS_QUICK: … … 564 564 /* PE- It might be good to make this a permanent part of the code! */ 565 565 if (ali15x3_initialized) { 566 printk(" ali15x3.o: Oops, ali15x3_init called a second time!\n");566 printk("i2c-ali15x3.o: Oops, ali15x3_init called a second time!\n"); 567 567 return -EBUSY; 568 568 } … … 570 570 ali15x3_initialized = 0; 571 571 if ((res = ali15x3_setup())) { 572 printk(" ali15x3.o: ALI15X3 not detected, module not inserted.\n");572 printk("i2c-ali15x3.o: ALI15X3 not detected, module not inserted.\n"); 573 573 ali15x3_cleanup(); 574 574 return res; … … 583 583 ali15x3_adapter.smbus_access = &ali15x3_access; 584 584 if ((res = smbus_add_adapter(&ali15x3_adapter))) { 585 printk(" ali15x3.o: Adapter registration failed, module not inserted.\n");585 printk("i2c-ali15x3.o: Adapter registration failed, module not inserted.\n"); 586 586 ali15x3_cleanup(); 587 587 return res; 588 588 } 589 589 ali15x3_initialized++; 590 printk(" ali15x3.o: ALI15X3 SMBus Controller detected and initialized\n");590 printk("i2c-ali15x3.o: ALI15X3 SMBus Controller detected and initialized\n"); 591 591 return 0; 592 592 } … … 598 598 { 599 599 if ((res = smbus_del_adapter(&ali15x3_adapter))) { 600 printk(" ali15x3.o: smbus_del_adapter failed, module not removed\n");600 printk("i2c-ali15x3.o: smbus_del_adapter failed, module not removed\n"); 601 601 return res; 602 602 } else lm-sensors/trunk/kernel/busses/i2c-isa.c
r207 r300 78 78 { 79 79 #ifdef DEBUG 80 printk("i sa.o: isa_master_xfer called for adapter `%s' "80 printk("i2c-isa.o: isa_master_xfer called for adapter `%s' " 81 81 "(no i2c level access possible!)\n", 82 82 adap->name); … … 89 89 { 90 90 #ifdef DEBUG 91 printk("i sa.o: isa_slave_send called for adapter `%s' "91 printk("i2c-isa.o: isa_slave_send called for adapter `%s' " 92 92 "(no i2c level access possible!)\n", 93 93 adap->name); … … 100 100 { 101 101 #ifdef DEBUG 102 printk("i sa.o: isa_slave_recv called for adapter `%s' "102 printk("i2c-isa.o: isa_slave_recv called for adapter `%s' " 103 103 "(no i2c level access possible!)\n", 104 104 adap->name); … … 133 133 #ifdef DEBUG 134 134 if (isa_initialized) { 135 printk("i sa.o: Oops, isa_init called a second time!\n");135 printk("i2c-isa.o: Oops, isa_init called a second time!\n"); 136 136 return -EBUSY; 137 137 } … … 139 139 isa_initialized = 0; 140 140 if ((res = isa_add_algorithm(&isa_algorithm))) { 141 printk("i sa.o: Algorithm registration failed, module not inserted.\n");141 printk("i2c-isa.o: Algorithm registration failed, module not inserted.\n"); 142 142 isa_cleanup(); 143 143 return res; … … 148 148 isa_adapter.algo = &isa_algorithm; 149 149 if ((res = isa_add_adapter(&isa_adapter))) { 150 printk("i sa.o: Adapter registration failed, "150 printk("i2c-isa.o: Adapter registration failed, " 151 151 "module isa.o is not inserted\n."); 152 152 isa_cleanup(); … … 154 154 } 155 155 isa_initialized++; 156 printk("i sa.o: ISA bus access for i2c modules initialized.\n");156 printk("i2c-isa.o: ISA bus access for i2c modules initialized.\n"); 157 157 return 0; 158 158 } … … 164 164 { 165 165 if ((res = isa_del_adapter(&isa_adapter))) { 166 printk("i sa.o: Adapter deregistration failed, module not removed.\n");166 printk("i2c-isa.o: Adapter deregistration failed, module not removed.\n"); 167 167 return res; 168 168 } else … … 172 172 { 173 173 if ((res = isa_del_algorithm(&isa_algorithm))) { 174 printk("i sa.o: Algorithm deregistration failed, module not removed.\n");174 printk("i2c-isa.o: Algorithm deregistration failed, module not removed.\n"); 175 175 return res; 176 176 } else lm-sensors/trunk/kernel/busses/i2c-piix4.c
r207 r300 108 108 /* First check whether we can access PCI at all */ 109 109 if (pci_present() == 0) { 110 printk(" piix4.o: Error: No PCI-bus found!\n");110 printk("i2c-piix4.o: Error: No PCI-bus found!\n"); 111 111 error_return=-ENODEV; 112 112 goto END; … … 132 132 if (res) { 133 133 #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,54) */ 134 printk(" piix4.o: Error: Can't detect PIIX4, function 3!\n");134 printk("i2c-piix4.o: Error: Can't detect PIIX4, function 3!\n"); 135 135 error_return=-ENODEV; 136 136 goto END; … … 143 143 144 144 if (check_region(piix4_smba, 8)) { 145 printk(" piix4.o: PIIX4_smb region 0x%x already in use!\n", piix4_smba);145 printk("i2c-piix4.o: PIIX4_smb region 0x%x already in use!\n", piix4_smba); 146 146 error_return=-ENODEV; 147 147 goto END; … … 162 162 pci_write_config_byte_united(PIIX4_dev, PIIX4_bus, PIIX4_devfn, 163 163 SMBHSTCFG, temp | 1); 164 printk(" piix4.0: WARNING: PIIX4 SMBus interface has been FORCEFULLY "164 printk("i2c-piix4.o: WARNING: PIIX4 SMBus interface has been FORCEFULLY " 165 165 "ENABLED!!\n"); 166 166 /* Update configuration value */ … … 182 182 #ifdef DEBUG 183 183 if ((temp & 0x0E) == 8) 184 printk(" piix4.o: PIIX4 using Interrupt 9 for SMBus.\n");184 printk("i2c-piix4.o: PIIX4 using Interrupt 9 for SMBus.\n"); 185 185 else if ((temp & 0x0E) == 0) 186 printk(" piix4.o: PIIX4 using Interrupt SMI# for SMBus.\n");186 printk("i2c-piix4.o: PIIX4 using Interrupt SMI# for SMBus.\n"); 187 187 else 188 printk(" piix4.o: PIIX4: Illegal Interrupt configuration (or code out "188 printk("i2c-piix4.o: PIIX4: Illegal Interrupt configuration (or code out " 189 189 "of date)!\n"); 190 190 191 191 pci_read_config_byte_united(PIIX4_dev, PIIX4_bus, PIIX4_devfn, SMBREV, 192 192 &temp); 193 printk(" piix4.o: SMBREV = 0x%X\n",temp);194 printk(" piix4.o: PIIX4_smba = 0x%X\n",piix4_smba);193 printk("i2c-piix4.o: SMBREV = 0x%X\n",temp); 194 printk("i2c-piix4.o: PIIX4_smba = 0x%X\n",piix4_smba); 195 195 #endif /* DEBUG */ 196 196 … … 215 215 216 216 #ifdef DEBUG 217 printk(" piix4.o: Transaction (pre): CNT=%02x, CMD=%02x, ADD=%02x, DAT0=%02x, "217 printk("i2c-piix4.o: Transaction (pre): CNT=%02x, CMD=%02x, ADD=%02x, DAT0=%02x, " 218 218 "DAT1=%02x\n", 219 219 inb_p(SMBHSTCNT),inb_p(SMBHSTCMD),inb_p(SMBHSTADD),inb_p(SMBHSTDAT0), … … 224 224 if ((temp = inb_p(SMBHSTSTS)) != 0x00) { 225 225 #ifdef DEBUG 226 printk(" piix4.o: SMBus busy (%02x). Resetting... \n",temp);226 printk("i2c-piix4.o: SMBus busy (%02x). Resetting... \n",temp); 227 227 #endif 228 228 outb_p(temp, SMBHSTSTS); 229 229 if ((temp = inb_p(SMBHSTSTS)) != 0x00) { 230 230 #ifdef DEBUG 231 printk(" piix4.o: Failed! (%02x)\n",temp);231 printk("i2c-piix4.o: Failed! (%02x)\n",temp); 232 232 #endif 233 233 return -1; 234 234 } else { 235 235 #ifdef DEBUG 236 printk(" piix4.o: Successfull!\n");236 printk("i2c-piix4.o: Successfull!\n"); 237 237 #endif 238 238 } … … 251 251 if (timeout >= MAX_TIMEOUT) { 252 252 #ifdef DEBUG 253 printk(" piix4.o: SMBus Timeout!\n");253 printk("i2c-piix4.o: SMBus Timeout!\n"); 254 254 result = -1; 255 255 #endif … … 259 259 result = -1; 260 260 #ifdef DEBUG 261 printk(" piix4.o: Error: Failed bus transaction\n");261 printk("i2c-piix4.o: Error: Failed bus transaction\n"); 262 262 #endif 263 263 } … … 265 265 if (temp & 0x08) { 266 266 result = -1; 267 printk(" piix4.o: Bus collision! SMBus may be locked until next hard267 printk("i2c-piix4.o: Bus collision! SMBus may be locked until next hard 268 268 reset. (sorry!)\n"); 269 269 /* Clock stops and slave is stuck in mid-transmission */ … … 273 273 result = -1; 274 274 #ifdef DEBUG 275 printk(" piix4.o: Error: no response!\n");275 printk("i2c-piix4.o: Error: no response!\n"); 276 276 #endif 277 277 } … … 282 282 if ((temp = inb_p(SMBHSTSTS)) != 0x00) { 283 283 #ifdef DEBUG 284 printk(" piix4.o: Failed reset at end of transaction (%02x)\n",temp);285 #endif 286 } 287 #ifdef DEBUG 288 printk(" piix4.o: Transaction (post): CNT=%02x, CMD=%02x, ADD=%02x, "284 printk("i2c-piix4.o: Failed reset at end of transaction (%02x)\n",temp); 285 #endif 286 } 287 #ifdef DEBUG 288 printk("i2c-piix4.o: Transaction (post): CNT=%02x, CMD=%02x, ADD=%02x, " 289 289 "DAT0=%02x, DAT1=%02x\n", 290 290 inb_p(SMBHSTCNT),inb_p(SMBHSTCMD),inb_p(SMBHSTADD),inb_p(SMBHSTDAT0), … … 302 302 switch(size) { 303 303 case SMBUS_PROC_CALL: 304 printk(" piix4.o: SMBUS_PROC_CALL not supported!\n");304 printk("i2c-piix4.o: SMBUS_PROC_CALL not supported!\n"); 305 305 return -1; 306 306 case SMBUS_QUICK: … … 388 388 /* PE- It might be good to make this a permanent part of the code! */ 389 389 if (piix4_initialized) { 390 printk(" piix4.o: Oops, piix4_init called a second time!\n");390 printk("i2c-piix4.o: Oops, piix4_init called a second time!\n"); 391 391 return -EBUSY; 392 392 } … … 394 394 piix4_initialized = 0; 395 395 if ((res = piix4_setup())) { 396 printk(" piix4.o: PIIX4 not detected, module not inserted.\n");396 printk("i2c-piix4.o: PIIX4 not detected, module not inserted.\n"); 397 397 piix4_cleanup(); 398 398 return res; … … 404 404 piix4_adapter.smbus_access = &piix4_access; 405 405 if ((res = smbus_add_adapter(&piix4_adapter))) { 406 printk(" piix4.o: Adapter registration failed, module not inserted.\n");406 printk("i2c-piix4.o: Adapter registration failed, module not inserted.\n"); 407 407 piix4_cleanup(); 408 408 return res; 409 409 } 410 410 piix4_initialized++; 411 printk(" piix4.o: PIIX4 bus detected and initialized\n");411 printk("i2c-piix4.o: PIIX4 bus detected and initialized\n"); 412 412 return 0; 413 413 } … … 419 419 { 420 420 if ((res = smbus_del_adapter(&piix4_adapter))) { 421 printk(" piix4.o: smbus_del_adapter failed, module not removed\n");421 printk("i2c-piix4.o: smbus_del_adapter failed, module not removed\n"); 422 422 return res; 423 423 } else
