Changeset 1536

Show
Ignore:
Timestamp:
09/18/02 23:14:08 (11 years ago)
Author:
amalysh
Message:

added sis730 as supported device
as of info from Philip Edelbrock <phil@…>
My Info:

pci device id 6300 is Intergrated VGA for sis630/730 chips
(see  http://www.plasma-online.de/index.html?content=http%3A//www.plasma-online.de/english/identify/picture/sis.html)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/kernel/busses/i2c-sis630.c

    r1527 r1536  
    5656#define I2C_HW_SMBUS_SIS630     0x08 
    5757#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 
     75struct 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 */ 
     83static 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 
    5889 
    5990/* SIS630 SMBus registers */ 
     
    326357        unsigned char b; 
    327358        struct pci_dev *sis630_dev = NULL,*tmp = NULL; 
     359        struct sd *en = supported; 
    328360 
    329361        /* First check whether we can access PCI at all */ 
     
    333365        } 
    334366 
    335         /* Look for the SIS630 */ 
     367        /* Look for the SIS630 and compatible */ 
    336368        if (!(sis630_dev = pci_find_device(PCI_VENDOR_ID_SI, 
    337369                                            PCI_DEVICE_ID_SI_503, 
    338370                                            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; 
    346387        } 
    347388        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 " 
    349390                        "loading because of force option enabled\n"); 
    350391        } 
     
    398439        sis630_initialized = 0; 
    399440        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"); 
    401442                i2c_sis630_cleanup(); 
    402443                return res; 
     
    412453        } 
    413454        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"); 
    415456 
    416457        return 0;