aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-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");