mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-29 21:08:19 +00:00
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.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1073 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
da40be7ab2
commit
de2652db9e
4 files changed
+32
-30
No files matched your search
@@ -21,7 +21,6 @@ ask CVS about it:
|
|||||||
NOTE: i2c-2.6.0 MUST BE be compiled AND installed first!!!
|
NOTE: i2c-2.6.0 MUST BE be compiled AND installed first!!!
|
||||||
If your make fails because it can't find <linux/i2c-proc.h>, you
|
If your make fails because it can't find <linux/i2c-proc.h>, you
|
||||||
forgot this step!!!
|
forgot this step!!!
|
||||||
Also, mkpatch is probably broken right now.
|
|
||||||
File doc/FAQ: Many updates and additions
|
File doc/FAQ: Many updates and additions
|
||||||
File doc/chips/via686a: Claim support for 686b.
|
File doc/chips/via686a: Claim support for 686b.
|
||||||
File README.thinkpad: new
|
File README.thinkpad: new
|
||||||
@@ -43,7 +42,7 @@ ask CVS about it:
|
|||||||
Save BIOS pin configuration of temps and fans
|
Save BIOS pin configuration of temps and fans
|
||||||
Module sensors: Disabled, moved to i2c package as i2c-proc.c
|
Module sensors: Disabled, moved to i2c package as i2c-proc.c
|
||||||
Module sis5595: Fix temp, add in4 for chip revision 0xc0.
|
Module sis5595: Fix temp, add in4 for chip revision 0xc0.
|
||||||
Module via686a: Allow force=9191,address (for A7V/K7V boards)
|
Module via686a: Allow force_addr=0xaddr (for A7V/K7V boards)
|
||||||
Module w83781d: Don't reinitialize as99127f chip; this may cause fan/temp
|
Module w83781d: Don't reinitialize as99127f chip; this may cause fan/temp
|
||||||
reading changes
|
reading changes
|
||||||
Programs i2cdetect, i2cdump: add devfs /dev/i2c/x support
|
Programs i2cdetect, i2cdump: add devfs /dev/i2c/x support
|
||||||
|
|||||||
+14
-5
@@ -1,4 +1,9 @@
|
|||||||
All chip drivers have a few insmod module parameters in common. These
|
Paramters for modprobe and insmod
|
||||||
|
=================================
|
||||||
|
|
||||||
|
All chip drivers have a few modprobe module parameters in common.
|
||||||
|
(Insmod can also be used, but we recommend modprobe so that
|
||||||
|
other required modules are automatically loaded.) These
|
||||||
parameters can be used when a module is inserted, to give some additional
|
parameters can be used when a module is inserted, to give some additional
|
||||||
information about how it should function. In this case, they tell where
|
information about how it should function. In this case, they tell where
|
||||||
the module should look for what chips. Usually, you don't need them, and
|
the module should look for what chips. Usually, you don't need them, and
|
||||||
@@ -12,15 +17,15 @@ nineteenth and `A' the first). If you want 'any I2C bus', use '-1'
|
|||||||
(or 65535).
|
(or 65535).
|
||||||
|
|
||||||
Each adapter has a number of addresses on I2C/SMBus adapters and/or the
|
Each adapter has a number of addresses on I2C/SMBus adapters and/or the
|
||||||
ISA bus that are always scanned if no insmod parameters are given. The
|
ISA bus that are always scanned if no modprobe parameters are given. The
|
||||||
parameters below override those addresses that are scanned by default.
|
parameters below override those addresses that are scanned by default.
|
||||||
|
|
||||||
All insmod parameters described below take lists of positive integers
|
All modprobe parameters described below take lists of positive integers
|
||||||
(unsigned, in the range of 0 to 65535) as their arguments. Integers
|
(unsigned, in the range of 0 to 65535) as their arguments. Integers
|
||||||
are separated by comma's, and may be given as ordinary decimal numbers,
|
are separated by comma's, and may be given as ordinary decimal numbers,
|
||||||
as octal numbers (by starting them with a `0') or as hexadecimal numbers
|
as octal numbers (by starting them with a `0') or as hexadecimal numbers
|
||||||
(by starting them with a `0x'). More information can be found by
|
(by starting them with a `0x'). More information can be found by
|
||||||
entering `man insmod'.
|
entering `man modprobe' or `man insmod'.
|
||||||
|
|
||||||
`force', `force_*', `ignore' and `probe' parameters take pairs of numbers.
|
`force', `force_*', `ignore' and `probe' parameters take pairs of numbers.
|
||||||
Each first (odd) number is a bus number, each second (even) number is
|
Each first (odd) number is a bus number, each second (even) number is
|
||||||
@@ -57,7 +62,11 @@ will skip all detection and recognition routines. This can lead to
|
|||||||
very strange results...
|
very strange results...
|
||||||
|
|
||||||
An example:
|
An example:
|
||||||
insmod lm78 force_lm79=9191,0x390 ignore=0,0x2d,1,0x20 probe_range=-1,0,0x7f
|
modprobe lm78 force_lm79=9191,0x390 ignore=0,0x2d,1,0x20 probe_range=-1,0,0x7f
|
||||||
# ISA address 0x390 contains a LM79
|
# ISA address 0x390 contains a LM79
|
||||||
# Scan all I2C addresses (from 0 to 0x7f) for all I2C adapters
|
# Scan all I2C addresses (from 0 to 0x7f) for all I2C adapters
|
||||||
# But skip address 0x2d on adapter 0, and address 0x20 on adapter 1
|
# But skip address 0x2d on adapter 0, and address 0x20 on adapter 1
|
||||||
|
|
||||||
|
`force_addr' is a parameter used for PCI sensor adapters.
|
||||||
|
It is used to program the base address of the sensor registers.
|
||||||
|
This is required if the BIOS does not initialize the base address.
|
||||||
+2
-3
@@ -18,14 +18,13 @@ Authors: Ky
|
|||||||
Module Parameters
|
Module Parameters
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
force=9191,address Set the I/O base address. Useful for Asus A7V boards
|
force_addr=0xaddr Set the I/O base address. Useful for Asus A7V boards
|
||||||
that don't set the address in the BIOS. Does not do a
|
that don't set the address in the BIOS. Does not do a
|
||||||
PCI force; the via686a must still be present in lspci.
|
PCI force; the via686a must still be present in lspci.
|
||||||
Don't use this unless the driver complains that the
|
Don't use this unless the driver complains that the
|
||||||
base address is not set. Otherwise the driver will
|
base address is not set. Otherwise the driver will
|
||||||
recognize both the old and the forced address.
|
recognize both the old and the forced address.
|
||||||
|
Example: 'modprobe via686a force_addr=0x290'
|
||||||
force_via686a=9191,address Same as force.
|
|
||||||
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|||||||
+15
-20
@@ -58,6 +58,13 @@
|
|||||||
#define THIS_MODULE NULL
|
#define THIS_MODULE NULL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* If force_addr is set to anything different from 0, we forcibly enable
|
||||||
|
the PIIX4 at the given address. VERY DANGEROUS! */
|
||||||
|
static int force_addr = 0;
|
||||||
|
MODULE_PARM(force_addr, "i");
|
||||||
|
MODULE_PARM_DESC(force_addr,
|
||||||
|
"Initialize the Via686a at the given address");
|
||||||
|
|
||||||
/* Addresses to scan.
|
/* Addresses to scan.
|
||||||
Note that we can't determine the ISA address until we have initialized
|
Note that we can't determine the ISA address until we have initialized
|
||||||
our module */
|
our module */
|
||||||
@@ -526,25 +533,13 @@ int via686a_find(int *address)
|
|||||||
pci_read_config_word(s_bridge, VIA686A_BASE_REG, &val))
|
pci_read_config_word(s_bridge, VIA686A_BASE_REG, &val))
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
*address = val & ~(VIA686A_EXTENT - 1);
|
*address = val & ~(VIA686A_EXTENT - 1);
|
||||||
if (*address == 0) {
|
if (*address == 0 && force_addr == 0) {
|
||||||
printk("via686a.o: base address not set - upgrade BIOS or use force=9191,addr\n");
|
printk("via686a.o: base address not set - upgrade BIOS or use force_addr=0xaddr\n");
|
||||||
/*
|
|
||||||
If we do this then the module won't load and force won't work.
|
|
||||||
But unfortunately the above printk is printed even if we are doing a force.
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
/*
|
if (force_addr)
|
||||||
Moved below.
|
*address = force_addr; /* so detect will get called */
|
||||||
if (PCIBIOS_SUCCESSFUL !=
|
|
||||||
pci_read_config_word(s_bridge, VIA686A_ENABLE_REG, &val))
|
|
||||||
return -ENODEV;
|
|
||||||
if (!(val & 0x01)) {
|
|
||||||
printk("via686a.o: enabling sensors\n");
|
|
||||||
pci_write_config_word(s_bridge, VIA686A_ENABLE_REG,
|
|
||||||
val | 0x01);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -565,15 +560,15 @@ int via686a_detect(struct i2c_adapter *adapter, int address,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(kind >= 0) /* force or force_via686a */
|
if(force_addr)
|
||||||
address &= ~(VIA686A_EXTENT - 1);
|
address = force_addr & ~(VIA686A_EXTENT - 1);
|
||||||
if (check_region(address, VIA686A_EXTENT)) {
|
if (check_region(address, VIA686A_EXTENT)) {
|
||||||
printk("via686a.o: region 0x%x already in use!\n",
|
printk("via686a.o: region 0x%x already in use!\n",
|
||||||
address);
|
address);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(kind >= 0) { /* treat force and force_via686a equally */
|
if(force_addr) {
|
||||||
printk("via686a.o: forcing ISA address 0x%04X\n", address);
|
printk("via686a.o: forcing ISA address 0x%04X\n", address);
|
||||||
if (PCIBIOS_SUCCESSFUL !=
|
if (PCIBIOS_SUCCESSFUL !=
|
||||||
pci_write_config_word(s_bridge, VIA686A_BASE_REG, address))
|
pci_write_config_word(s_bridge, VIA686A_BASE_REG, address))
|
||||||
|
|||||||
Reference in new issue
Block a user