Changeset 1536
- Timestamp:
- 09/18/02 23:14:08 (11 years ago)
- Files:
-
- 1 modified
-
lm-sensors/trunk/kernel/busses/i2c-sis630.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/kernel/busses/i2c-sis630.c
r1527 r1536 56 56 #define I2C_HW_SMBUS_SIS630 0x08 57 57 #endif 58 59 #ifndef PCI_VENDOR_ID_SI 60 #define PCI_VENDOR_ID_SI 0x1039 61 #endif 62 63 #ifndef PCI_DEVICE_ID_SI_630 64 #define PCI_DEVICE_ID_SI_630 0x0630 65 #endif 66 67 #ifndef PCI_DEVICE_ID_SI_730 68 #define PCI_DEVICE_ID_SI_730 0x0730 69 #endif 70 71 #ifndef PCI_DEVICE_ID_SI_503 72 #define PCI_DEVICE_ID_SI_503 0x0008 73 #endif 74 75 struct sd { 76 const unsigned short mfr; 77 const unsigned short dev; 78 const unsigned char fn; 79 const char *name; 80 }; 81 82 /* supported chips */ 83 static struct sd supported[] = { 84 {PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_630, 0, "SIS630"}, 85 {PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_730, 0, "SIS730"}, 86 {0, 0, 0, NULL} 87 }; 88 58 89 59 90 /* SIS630 SMBus registers */ … … 326 357 unsigned char b; 327 358 struct pci_dev *sis630_dev = NULL,*tmp = NULL; 359 struct sd *en = supported; 328 360 329 361 /* First check whether we can access PCI at all */ … … 333 365 } 334 366 335 /* Look for the SIS630 */367 /* Look for the SIS630 and compatible */ 336 368 if (!(sis630_dev = pci_find_device(PCI_VENDOR_ID_SI, 337 369 PCI_DEVICE_ID_SI_503, 338 370 sis630_dev))) { 339 printk(KERN_ERR "i2c-sis630.o: Error: Can't detect SIS630!\n"); 340 return -ENODEV; 341 } 342 tmp = pci_find_device(PCI_VENDOR_ID_SI,PCI_DEVICE_ID_SI_630,NULL); 343 if (tmp == NULL && force == 0) { 344 printk(KERN_ERR "i2c-sis630.o: Error: Can't detect SIS630!\n"); 345 return -ENODEV; 371 printk(KERN_ERR "i2c-sis630.o: Error: Can't detect 85C503/5513 ISA bridge!\n"); 372 return -ENODEV; 373 } 374 do { 375 if ((tmp = pci_find_device(en->mfr,en->dev,NULL))) { 376 if (PCI_FUNC(tmp->devfn) != en->fn) 377 continue; 378 379 break; 380 } 381 en++; 382 } 383 while(en->mfr); 384 if (tmp == NULL && force == 0 ) { 385 printk(KERN_ERR "i2c-sis630.o: Error: Can't detect SIS630 compatible device!\n"); 386 return -ENODEV; 346 387 } 347 388 else if (tmp == NULL && force > 0) { 348 printk(KERN_NOTICE "i2c-sis630.o: WARNING: Can't detect SIS630 , but "389 printk(KERN_NOTICE "i2c-sis630.o: WARNING: Can't detect SIS630 compatible device, but " 349 390 "loading because of force option enabled\n"); 350 391 } … … 398 439 sis630_initialized = 0; 399 440 if ((res = sis630_setup())) { 400 printk(KERN_ERR "i2c-sis630.o: SIS630 not detected, module not inserted.\n");441 printk(KERN_ERR "i2c-sis630.o: SIS630 compatible bus not detected, module not inserted.\n"); 401 442 i2c_sis630_cleanup(); 402 443 return res; … … 412 453 } 413 454 sis630_initialized++; 414 printk(KERN_INFO "i2c-sis630.o: SIS630 bus detected and initialized\n");455 printk(KERN_INFO "i2c-sis630.o: SIS630 compatible bus detected and initialized\n"); 415 456 416 457 return 0;
