Changeset 1073

Show
Ignore:
Timestamp:
04/21/01 21:49:15 (14 years ago)
Author:
mds
Message:

Change base-address-setting parameter from force or force_via686a

to force_addr. It is now consistent with the bus PCI adapters
that support base address setting (piix4, i801, viapro).
Other benefit is that via686a_find can now return -ENODEV,
and module will fail to load when base address is not set and
parameter is not used.

Location:
lm-sensors/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r1070 r1073  
    2222        If your make fails because it can't find <linux/i2c-proc.h>, you 
    2323        forgot this step!!! 
    24         Also, mkpatch is probably broken right now. 
    2524  File doc/FAQ: Many updates and additions 
    2625  File doc/chips/via686a: Claim support for 686b. 
     
    4443  Module sensors: Disabled, moved to i2c package as i2c-proc.c 
    4544  Module sis5595: Fix temp, add in4 for chip revision 0xc0. 
    46   Module via686a: Allow force=9191,address (for A7V/K7V boards) 
     45  Module via686a: Allow force_addr=0xaddr (for A7V/K7V boards) 
    4746  Module w83781d: Don't reinitialize as99127f chip; this may cause fan/temp 
    4847                  reading changes 
  • lm-sensors/trunk/doc/chips/MODPARMS

    r412 r1073  
    1 All chip drivers have a few insmod module parameters in common. These 
     1Paramters for modprobe and insmod 
     2================================= 
     3 
     4All chip drivers have a few modprobe module parameters in common. 
     5(Insmod can also be used, but we recommend modprobe so that 
     6other required modules are automatically loaded.) These 
    27parameters can be used when a module is inserted, to give some additional 
    38information about how it should function. In this case, they tell where 
     
    1318 
    1419Each adapter has a number of addresses on I2C/SMBus adapters and/or the 
    15 ISA bus that are always scanned if no insmod parameters are given. The 
     20ISA bus that are always scanned if no modprobe parameters are given. The 
    1621parameters below override those addresses that are scanned by default. 
    1722 
    18 All insmod parameters described below take lists of positive integers 
     23All modprobe parameters described below take lists of positive integers 
    1924(unsigned, in the range of 0 to 65535) as their arguments.  Integers 
    2025are separated by comma's, and may be given as ordinary decimal numbers, 
    2126as octal numbers (by starting them with a `0') or as hexadecimal numbers 
    2227(by starting them with a `0x'). More information can be found by 
    23 entering `man insmod'. 
     28entering `man modprobe' or `man insmod'. 
    2429 
    2530`force', `force_*', `ignore' and `probe' parameters take pairs of numbers. 
     
    5863 
    5964An example: 
    60   insmod lm78 force_lm79=9191,0x390 ignore=0,0x2d,1,0x20 probe_range=-1,0,0x7f 
     65  modprobe lm78 force_lm79=9191,0x390 ignore=0,0x2d,1,0x20 probe_range=-1,0,0x7f 
    6166  # ISA address 0x390 contains a LM79 
    6267  # Scan all I2C addresses (from 0 to 0x7f) for all I2C adapters 
    6368  # But skip address 0x2d on adapter 0, and address 0x20 on adapter 1 
     69 
     70`force_addr' is a parameter used for PCI sensor adapters. 
     71It is used to program the base address of the sensor registers. 
     72This is required if the BIOS does not initialize the base address. 
  • lm-sensors/trunk/doc/chips/via686a

    r1010 r1073  
    1919----------------- 
    2020 
    21 force=9191,address      Set the I/O base address. Useful for Asus A7V boards 
     21force_addr=0xaddr       Set the I/O base address. Useful for Asus A7V boards 
    2222                        that don't set the address in the BIOS. Does not do a 
    2323                        PCI force; the via686a must still be present in lspci. 
     
    2525                        base address is not set. Otherwise the driver will 
    2626                        recognize both the old and the forced address. 
    27  
    28 force_via686a=9191,address      Same as force. 
     27                        Example: 'modprobe via686a force_addr=0x290' 
    2928 
    3029 
  • lm-sensors/trunk/kernel/chips/via686a.c

    r1015 r1073  
    5858#define THIS_MODULE NULL 
    5959#endif 
     60 
     61/* If force_addr is set to anything different from 0, we forcibly enable 
     62   the PIIX4 at the given address. VERY DANGEROUS! */ 
     63static int force_addr = 0; 
     64MODULE_PARM(force_addr, "i"); 
     65MODULE_PARM_DESC(force_addr, 
     66                 "Initialize the Via686a at the given address"); 
    6067 
    6168/* Addresses to scan. 
     
    527534                return -ENODEV; 
    528535        *address = val & ~(VIA686A_EXTENT - 1); 
    529         if (*address == 0) { 
    530                 printk("via686a.o: base address not set - upgrade BIOS or use force=9191,addr\n"); 
    531 /* 
    532    If we do this then the module won't load and force won't work. 
    533    But unfortunately the above printk is printed even if we are doing a force. 
     536        if (*address == 0 && force_addr == 0) { 
     537                printk("via686a.o: base address not set - upgrade BIOS or use force_addr=0xaddr\n"); 
    534538                return -ENODEV; 
    535 */ 
    536         } 
    537 /* 
    538    Moved below. 
    539         if (PCIBIOS_SUCCESSFUL != 
    540             pci_read_config_word(s_bridge, VIA686A_ENABLE_REG, &val)) 
    541                 return -ENODEV; 
    542         if (!(val & 0x01)) { 
    543                 printk("via686a.o: enabling sensors\n"); 
    544                 pci_write_config_word(s_bridge, VIA686A_ENABLE_REG, 
    545                                       val | 0x01); 
    546         } 
    547 */ 
     539        } 
     540        if (force_addr) 
     541                *address = force_addr;  /* so detect will get called */ 
     542 
    548543        return 0; 
    549544} 
     
    566561        } 
    567562 
    568         if(kind >= 0)           /* force or force_via686a */ 
    569                 address &= ~(VIA686A_EXTENT - 1); 
     563        if(force_addr) 
     564                address = force_addr & ~(VIA686A_EXTENT - 1); 
    570565        if (check_region(address, VIA686A_EXTENT)) { 
    571566                printk("via686a.o: region 0x%x already in use!\n", 
     
    574569        } 
    575570 
    576         if(kind >= 0) {         /* treat force and force_via686a equally */ 
     571        if(force_addr) { 
    577572                printk("via686a.o: forcing ISA address 0x%04X\n", address); 
    578573                if (PCIBIOS_SUCCESSFUL !=