Changeset 1708

Show
Ignore:
Timestamp:
01/24/03 00:24:05 (10 years ago)
Author:
kmalkki
Message:

(Kyösti) Clean PCI IDs already defined for 2.4.9.

Location:
lm-sensors/trunk/kernel
Files:
11 modified

Legend:

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

    r1705 r1708  
    5757#endif 
    5858 
    59 #ifndef PCI_DEVICE_ID_INTEL_82801AA_3 
    60 #define PCI_DEVICE_ID_INTEL_82801AA_3   0x2413 
    61 #endif 
    62 #ifndef PCI_DEVICE_ID_INTEL_82801AB_3 
    63 #define PCI_DEVICE_ID_INTEL_82801AB_3   0x2423 
    64 #endif 
    65 #ifndef PCI_DEVICE_ID_INTEL_82801BA_2 
    66 #define PCI_DEVICE_ID_INTEL_82801BA_2   0x2443 
    67 #endif 
     59#ifndef PCI_DEVICE_ID_INTEL_82801CA_SMBUS 
    6860#define PCI_DEVICE_ID_INTEL_82801CA_SMBUS       0x2483 
     61#endif 
     62 
     63#ifndef PCI_DEVICE_ID_INTEL_82801DB_SMBUS 
    6964#define PCI_DEVICE_ID_INTEL_82801DB_SMBUS       0x24C3 
     65#endif 
    7066 
    7167static int supported[] = {PCI_DEVICE_ID_INTEL_82801AA_3, 
  • lm-sensors/trunk/kernel/busses/i2c-i810.c

    r1705 r1708  
    4646MODULE_LICENSE("GPL"); 
    4747 
    48 /* PCI defines */ 
    49 #ifndef PCI_DEVICE_ID_INTEL_82810_IG1 
    50 #define PCI_DEVICE_ID_INTEL_82810_IG1 0x7121 
    51 #endif 
    52 #ifndef PCI_DEVICE_ID_INTEL_82810_IG3 
    53 #define PCI_DEVICE_ID_INTEL_82810_IG3 0x7123 
    54 #endif 
    5548#ifndef PCI_DEVICE_ID_INTEL_82815_2 
    5649#define PCI_DEVICE_ID_INTEL_82815_2   0x1132 
  • lm-sensors/trunk/kernel/busses/i2c-piix4.c

    r1705 r1708  
    4444#include "dmi_scan.h" 
    4545 
    46 /* Note: We assume all devices are identical 
    47          to the Intel PIIX4; we only mention it during detection.   */ 
    48  
    49 #ifndef PCI_DEVICE_ID_SERVERWORKS_OSB4 
    50 #define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 
    51 #endif 
    52  
    53 #ifndef PCI_DEVICE_ID_SERVERWORKS_CSB5 
    54 #define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 
    55 #endif 
    56  
    57 #ifndef PCI_VENDOR_ID_SERVERWORKS 
    58 #define PCI_VENDOR_ID_SERVERWORKS 0x01166 
    59 #endif 
    60  
    61 #ifndef PCI_DEVICE_ID_INTEL_82443MX_3 
    62 #define PCI_DEVICE_ID_INTEL_82443MX_3   0x719b 
    63 #endif 
    64  
    65 #ifndef PCI_VENDOR_ID_EFAR 
    66 #define PCI_VENDOR_ID_EFAR              0x1055 
    67 #endif 
    68  
    69 #ifndef PCI_DEVICE_ID_EFAR_SLC90E66_3 
    70 #define PCI_DEVICE_ID_EFAR_SLC90E66_3   0x9463 
    71 #endif 
    7246 
    7347struct sd { 
     
    7751        const char *name; 
    7852}; 
     53 
     54/* Note: We assume all devices are identical 
     55         to the Intel PIIX4; we only mention it during detection.   */ 
    7956 
    8057static struct sd supported[] = { 
  • lm-sensors/trunk/kernel/busses/i2c-sis5595.c

    r1705 r1708  
    6262 
    6363MODULE_LICENSE("GPL"); 
    64  
    65 #ifndef PCI_DEVICE_ID_SI_540 
    66 #define PCI_DEVICE_ID_SI_540            0x0540 
    67 #endif 
    68 #ifndef PCI_DEVICE_ID_SI_550 
    69 #define PCI_DEVICE_ID_SI_550            0x0550 
    70 #endif 
    71 #ifndef PCI_DEVICE_ID_SI_630 
    72 #define PCI_DEVICE_ID_SI_630            0x0630 
    73 #endif 
    74 #ifndef PCI_DEVICE_ID_SI_730 
    75 #define PCI_DEVICE_ID_SI_730            0x0730 
    76 #endif 
    77 #ifndef PCI_DEVICE_ID_SI_5598 
    78 #define PCI_DEVICE_ID_SI_5598           0x5598 
    79 #endif 
    8064 
    8165static int blacklist[] = { 
  • lm-sensors/trunk/kernel/busses/i2c-sis630.c

    r1705 r1708  
    6060#include "version.h" 
    6161 
    62 #ifndef PCI_VENDOR_ID_SI 
    63 #define PCI_VENDOR_ID_SI        0x1039 
    64 #endif 
    65  
    66 #ifndef PCI_DEVICE_ID_SI_630 
    67 #define PCI_DEVICE_ID_SI_630    0x0630 
    68 #endif 
    69  
    70 #ifndef PCI_DEVICE_ID_SI_730 
    71 #define PCI_DEVICE_ID_SI_730    0x0730 
    72 #endif 
    73  
    74 #ifndef PCI_DEVICE_ID_SI_503 
    75 #define PCI_DEVICE_ID_SI_503    0x0008 
    76 #endif 
    77  
    7862struct sd { 
    7963        const unsigned short mfr; 
  • lm-sensors/trunk/kernel/busses/i2c-sis645.c

    r1705 r1708  
    4848#define DRV_NAME "i2c-sis645" 
    4949 
    50 /* PCI identifiers */ 
    51  
    52 /* SiS645 north bridge */ 
    53 #ifndef PCI_DEVICE_ID_SI_645 
    54 #define PCI_DEVICE_ID_SI_645 0x0645 
    55 #endif 
    56  
    5750/* SiS645DX north bridge */ 
    5851#ifndef PCI_DEVICE_ID_SI_646 
     
    6558#endif 
    6659 
    67 /* SiS650 north bridge */ 
    68 #ifndef PCI_DEVICE_ID_SI_650 
    69 #define PCI_DEVICE_ID_SI_650 0x0650 
    70 #endif 
    71  
    72 /* SiS735 combo chipset */ 
    73 #ifndef PCI_DEVICE_ID_SI_735 
    74 #define PCI_DEVICE_ID_SI_735 0x0735 
    75 #endif 
    7660 
    7761/* SiS961 south bridge */ 
     
    8468#define PCI_DEVICE_ID_SI_962 0x0962 
    8569#endif 
    86  
    8770 
    8871#define PCI_DEVICE_ID_SI_SMBUS 0x16 
  • lm-sensors/trunk/kernel/busses/i2c-via.c

    r1705 r1708  
    3333#include "version.h" 
    3434 
    35 MODULE_LICENSE("GPL"); 
    36  
    37 /* PCI device */ 
    38 #define VENDOR          PCI_VENDOR_ID_VIA 
    39 #define DEVICE          PCI_DEVICE_ID_VIA_82C586_3 
    40  
    4135/* Power management registers */ 
    4236 
     
    5549#define IOTEXT          "via-i2c" 
    5650 
    57 /* ----- global defines ----------------------------------------------- */ 
    58 #define DEB(x) x                /* silicon revision, io addresses       */ 
    59 #define DEB2(x) x               /* line status                          */ 
    60 #define DEBE(x)                 /*                                      */ 
    61  
    62 /* ----- local functions ---------------------------------------------- */ 
    63  
    64 static u16 pm_io_base; 
     51static u16 pm_io_base = 0; 
    6552 
    6653/* 
     
    9582 
    9683 
    97 /* When exactly was the new pci interface introduced? */ 
    98 static int find_via(void) 
    99 { 
    100         struct pci_dev *s_bridge; 
    101  
    102         if (!pci_present()) 
    103                 return -ENODEV; 
    104  
    105         s_bridge = pci_find_device(VENDOR, DEVICE, NULL); 
    106  
    107         if (!s_bridge) { 
    108                 printk("i2c-via.o: vt82c586b not found\n"); 
    109                 return -ENODEV; 
    110         } 
    111  
    112         return 0; 
    113 } 
    114  
    11584static struct i2c_algo_bit_data bit_data = { 
    11685        .setsda         = bit_via_setsda, 
     
    12392}; 
    12493 
    125 static struct i2c_adapter bit_via_adapter = { 
     94static struct i2c_adapter vt586b_adapter = { 
    12695        .owner          = THIS_MODULE, 
    12796        .name           = "VIA i2c", 
    12897        .id             = I2C_HW_B_VIA, 
    129         .algo_data              = &bit_data, 
     98        .algo_data      = &bit_data, 
    13099}; 
    131100 
    132101 
    133102static struct pci_device_id vt586b_ids[] __devinitdata = { 
     103        { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 
    134104        { 0, } 
    135105}; 
     
    139109        u16 base; 
    140110        u8 rev; 
     111        int res; 
     112 
     113        if (pm_io_base) { 
     114                printk(KERN_ERR "i2c-via.o: Will only support one host\n"); 
     115                return -EBUSY; 
     116        } 
    141117 
    142118        pci_read_config_byte(dev, PM_CFG_REVID, &rev); 
     
    159135        pm_io_base &= (0xff << 8); 
    160136 
    161         return -ENODEV; 
    162  
    163137        if (! request_region(I2C_DIR, IOSPACE, IOTEXT)) { 
    164138            printk("i2c-via.o: IO 0x%x-0x%x already in use\n", 
     
    168142        outb(inb(I2C_DIR) & ~(I2C_SDA | I2C_SCL), I2C_DIR); 
    169143        outb(inb(I2C_OUT) & ~(I2C_SDA | I2C_SCL), I2C_OUT); 
    170  
    171         i2c_bit_add_bus(&bit_via_adapter); 
     144         
     145        res = i2c_bit_add_bus(&vt586b_adapter); 
     146        if ( res < 0 ) { 
     147                release_region(I2C_DIR, IOSPACE); 
     148                pm_io_base = 0; 
     149                return res; 
     150        } 
     151        return 0; 
    172152} 
    173153 
    174154static void __devexit vt586b_remove(struct pci_dev *dev) 
    175155{ 
    176         i2c_bit_del_bus(&bit_via_adapter); 
     156        i2c_bit_del_bus(&vt586b_adapter); 
     157        release_region(I2C_DIR, IOSPACE); 
     158        pm_io_base = 0; 
    177159} 
    178160 
     
    195177{ 
    196178        pci_unregister_driver(&vt586b_driver); 
    197         release_region(I2C_DIR, IOSPACE); 
    198179} 
    199  
    200180 
    201181 
    202182MODULE_AUTHOR("Kyösti Mälkki <kmalkki@cc.hut.fi>"); 
    203183MODULE_DESCRIPTION("i2c for Via vt82c586b southbridge"); 
     184MODULE_LICENSE("GPL"); 
    204185 
    205186module_init(i2c_vt586b_init); 
  • lm-sensors/trunk/kernel/busses/i2c-viapro.c

    r1705 r1708  
    4343#include <asm/io.h> 
    4444#include "version.h" 
    45  
    46 #ifndef PCI_DEVICE_ID_VIA_82C596_3 
    47 #define PCI_DEVICE_ID_VIA_82C596_3      0x3050 
    48 #endif 
    49 #ifndef PCI_DEVICE_ID_VIA_82C596B_3 
    50 #define PCI_DEVICE_ID_VIA_82C596B_3     0x3051 
    51 #endif 
    52 #ifndef PCI_DEVICE_ID_VIA_82C686_4 
    53 #define PCI_DEVICE_ID_VIA_82C686_4      0x3057 
    54 #endif 
    55 #ifndef PCI_DEVICE_ID_VIA_8233_0 
    56 #define PCI_DEVICE_ID_VIA_8233_0        0x3074 
    57 #endif 
    5845 
    5946#define SMBBA1      0x90 
  • lm-sensors/trunk/kernel/busses/i2c-voodoo3.c

    r1705 r1708  
    3737 
    3838MODULE_LICENSE("GPL"); 
    39  
    40 /* 3DFX defines */ 
    41 #ifndef PCI_DEVICE_ID_3DFX_VOODOO3 
    42 #define PCI_DEVICE_ID_3DFX_VOODOO3 0x05 
    43 #endif 
    44 #ifndef PCI_DEVICE_ID_3DFX_BANSHEE 
    45 #define PCI_DEVICE_ID_3DFX_BANSHEE 0x03 
    46 #endif 
    4739 
    4840/* the only registers we use */ 
  • lm-sensors/trunk/kernel/chips/sis5595.c

    r1705 r1708  
    7979/* Insmod parameters */ 
    8080SENSORS_INSMOD_1(sis5595); 
    81  
    82 #ifndef PCI_DEVICE_ID_SI_540 
    83 #define PCI_DEVICE_ID_SI_540            0x0540 
    84 #endif 
    85 #ifndef PCI_DEVICE_ID_SI_550 
    86 #define PCI_DEVICE_ID_SI_550            0x0550 
    87 #endif 
    88 #ifndef PCI_DEVICE_ID_SI_630 
    89 #define PCI_DEVICE_ID_SI_630            0x0630 
    90 #endif 
    91 #ifndef PCI_DEVICE_ID_SI_730 
    92 #define PCI_DEVICE_ID_SI_730            0x0730 
    93 #endif 
    94 #ifndef PCI_DEVICE_ID_SI_5598 
    95 #define PCI_DEVICE_ID_SI_5598           0x5598 
    96 #endif 
    9781 
    9882static int blacklist[] = { 
  • lm-sensors/trunk/kernel/chips/via686a.c

    r1705 r1708  
    4141#include <asm/io.h> 
    4242#include "version.h" 
    43  
    44 #ifndef PCI_DEVICE_ID_VIA_82C686_4 
    45 #define PCI_DEVICE_ID_VIA_82C686_4 0x3057 
    46 #endif 
    4743 
    4844