summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-i801.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-10-26 21:31:15 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 14:02:14 -0700
commit585b3160f8212e58325bc1c0292c2ec01ac5db84 (patch)
tree368c38952dc1ee6b514266f6b25a285d6bc5d98c /drivers/i2c/busses/i2c-i801.c
parent421ef47be20c5454b12ae0ec918d5073a9d2b938 (diff)
downloadblackbird-op-linux-585b3160f8212e58325bc1c0292c2ec01ac5db84.tar.gz
blackbird-op-linux-585b3160f8212e58325bc1c0292c2ec01ac5db84.zip
[PATCH] i2c: SMBus PEC support rewrite, 3 of 3
The new SMBus PEC implementation doesn't support PEC emulation on non-PEC non-I2C SMBus masters, so we can drop all related code. 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-i801.c')
-rw-r--r--drivers/i2c/busses/i2c-i801.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index b05e045f770c..27e7894a9d1c 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -102,8 +102,8 @@ MODULE_PARM_DESC(force_addr,
"EXTREMELY DANGEROUS!");
static int i801_transaction(void);
-static int i801_block_transaction(union i2c_smbus_data *data,
- char read_write, int command);
+static int i801_block_transaction(union i2c_smbus_data *data, char read_write,
+ int command, int hwpec);
static unsigned short i801_smba;
static struct pci_driver i801_driver;
@@ -249,7 +249,7 @@ static int i801_transaction(void)
/* All-inclusive block transaction function */
static int i801_block_transaction(union i2c_smbus_data *data, char read_write,
- int command)
+ int command, int hwpec)
{
int i, len;
int smbcmd;
@@ -388,7 +388,7 @@ static int i801_block_transaction(union i2c_smbus_data *data, char read_write,
goto END;
}
- if(isich4 && command == I2C_SMBUS_BLOCK_DATA_PEC) {
+ if (hwpec && command == I2C_SMBUS_BLOCK_DATA) {
/* wait for INTR bit as advised by Intel */
timeout = 0;
do {
@@ -456,9 +456,6 @@ static s32 i801_access(struct i2c_adapter * adap, u16 addr,
break;
case I2C_SMBUS_BLOCK_DATA:
case I2C_SMBUS_I2C_BLOCK_DATA:
- case I2C_SMBUS_BLOCK_DATA_PEC:
- if(hwpec && size == I2C_SMBUS_BLOCK_DATA)
- size = I2C_SMBUS_BLOCK_DATA_PEC;
outb_p(((addr & 0x7f) << 1) | (read_write & 0x01),
SMBHSTADD);
outb_p(command, SMBHSTCMD);
@@ -476,7 +473,7 @@ static s32 i801_access(struct i2c_adapter * adap, u16 addr,
outb_p(1, SMBAUXCTL); /* enable HW PEC */
}
if(block)
- ret = i801_block_transaction(data, read_write, size);
+ ret = i801_block_transaction(data, read_write, size, hwpec);
else {
outb_p(xact | ENABLE_INT9, SMBHSTCNT);
ret = i801_transaction();
OpenPOWER on IntegriCloud