aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-piix4.c
diff options
context:
space:
mode:
authorRudolf Marek <r.marek@sh.cvut.cz>2006-04-25 07:06:41 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-22 14:10:32 -0400
commit54aaa1ca1022d95d854315743241bb6bf59f531f (patch)
treeaf43ffb4efb559b823b6ce6db30df3667ecfe194 /drivers/i2c/busses/i2c-piix4.c
parent5e9f4f2e5a02bb6908278a819952aa31fffefaa2 (diff)
[PATCH] I2C: i2c-piix4: Remove the fix_hstcfg parameter
This patch removes the fix_hstcfg option from the driver and related SMBus Interrupt Select register magic because now we know what are valid values for this register. This patch updates the documentation and adds new IRQ mode check so we are sure not to miss any new "unusual" value. The PCI quirk for users of fix_hstcfg was not developed because the chipset lacks of subsystem ID registers and DMI is stated "To be filled". Impact to existing systems is minimal because the problem showed up on motherboards like 10 years back. On the other hand users of newer Serverworks and HT1000 systems won't be misleaded by the message suggesting to try the fix_hstcfg any more. Signed-off-by: Rudolf Marek <r.marek@sh.cvut.cz> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-piix4.c')
-rw-r--r--drivers/i2c/busses/i2c-piix4.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
index 5f06e81a2087..05af7b0292f4 100644
--- a/drivers/i2c/busses/i2c-piix4.c
+++ b/drivers/i2c/busses/i2c-piix4.c
@@ -102,13 +102,6 @@ MODULE_PARM_DESC(force_addr,
102 "Forcibly enable the PIIX4 at the given address. " 102 "Forcibly enable the PIIX4 at the given address. "
103 "EXTREMELY DANGEROUS!"); 103 "EXTREMELY DANGEROUS!");
104 104
105/* If fix_hstcfg is set to anything different from 0, we reset one of the
106 registers to be a valid value. */
107static int fix_hstcfg;
108module_param (fix_hstcfg, int, 0);
109MODULE_PARM_DESC(fix_hstcfg,
110 "Fix config register. Needed on some boards (Force CPCI735).");
111
112static int piix4_transaction(void); 105static int piix4_transaction(void);
113 106
114static unsigned short piix4_smba; 107static unsigned short piix4_smba;
@@ -166,22 +159,6 @@ static int __devinit piix4_setup(struct pci_dev *PIIX4_dev,
166 159
167 pci_read_config_byte(PIIX4_dev, SMBHSTCFG, &temp); 160 pci_read_config_byte(PIIX4_dev, SMBHSTCFG, &temp);
168 161
169 /* Some BIOS will set up the chipset incorrectly and leave a register
170 in an undefined state (causing I2C to act very strangely). */
171 if (temp & 0x02) {
172 if (fix_hstcfg) {
173 dev_info(&PIIX4_dev->dev, "Working around buggy BIOS "
174 "(I2C)\n");
175 temp &= 0xfd;
176 pci_write_config_byte(PIIX4_dev, SMBHSTCFG, temp);
177 } else {
178 dev_info(&PIIX4_dev->dev, "Unusual config register "
179 "value\n");
180 dev_info(&PIIX4_dev->dev, "Try using fix_hstcfg=1 if "
181 "you experience problems\n");
182 }
183 }
184
185 /* If force_addr is set, we program the new address here. Just to make 162 /* If force_addr is set, we program the new address here. Just to make
186 sure, we disable the PIIX4 first. */ 163 sure, we disable the PIIX4 first. */
187 if (force_addr) { 164 if (force_addr) {
@@ -214,7 +191,7 @@ static int __devinit piix4_setup(struct pci_dev *PIIX4_dev,
214 } 191 }
215 } 192 }
216 193
217 if ((temp & 0x0E) == 8) 194 if (((temp & 0x0E) == 8) || ((temp & 0x0E) == 2))
218 dev_dbg(&PIIX4_dev->dev, "Using Interrupt 9 for SMBus.\n"); 195 dev_dbg(&PIIX4_dev->dev, "Using Interrupt 9 for SMBus.\n");
219 else if ((temp & 0x0E) == 0) 196 else if ((temp & 0x0E) == 0)
220 dev_dbg(&PIIX4_dev->dev, "Using Interrupt SMI# for SMBus.\n"); 197 dev_dbg(&PIIX4_dev->dev, "Using Interrupt SMI# for SMBus.\n");