From bb89ea05e38297d222515239bb0efea870376238 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 14 Aug 2003 22:28:42 +0000 Subject: [PATCH] Force CPCI735 bug workaround (patch by Tom Rini). git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1961 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/busses/i2c-piix4.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kernel/busses/i2c-piix4.c b/kernel/busses/i2c-piix4.c index e06acf82..c24b84ce 100644 --- a/kernel/busses/i2c-piix4.c +++ b/kernel/busses/i2c-piix4.c @@ -179,6 +179,15 @@ static int piix4_setup(struct pci_dev *PIIX4_dev, const struct pci_device_id *id } pci_read_config_byte(PIIX4_dev, SMBHSTCFG, &temp); + + /* Some BIOS will set up the chipset incorrectly and leave a register + in an undefined state (causing I2C to act very strangely). */ + if (temp & 0x02) { + printk("Worked around buggy BIOS (I2C)\n"); + temp &= 0xfd; + pci_write_config_byte(PIIX4_dev, SMBHSTCFG, temp); + } + /* If force_addr is set, we program the new address here. Just to make sure, we disable the PIIX4 first. */ if (force_addr) {