aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-i801.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-10-26 15:31:15 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 17:02:14 -0400
commit585b3160f8212e58325bc1c0292c2ec01ac5db84 (patch)
tree368c38952dc1ee6b514266f6b25a285d6bc5d98c /drivers/i2c/busses/i2c-i801.c
parent421ef47be20c5454b12ae0ec918d5073a9d2b938 (diff)
[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,
102 "EXTREMELY DANGEROUS!"); 102 "EXTREMELY DANGEROUS!");
103 103
104static int i801_transaction(void); 104static int i801_transaction(void);
105static int i801_block_transaction(union i2c_smbus_data *data, 105static int i801_block_transaction(union i2c_smbus_data *data, char read_write,
106 char read_write, int command); 106 int command, int hwpec);
107 107
108static unsigned short i801_smba; 108static unsigned short i801_smba;
109static struct pci_driver i801_driver; 109static struct pci_driver i801_driver;
@@ -249,7 +249,7 @@ static int i801_transaction(void)
249 249
250/* All-inclusive block transaction function */ 250/* All-inclusive block transaction function */
251static int i801_block_transaction(union i2c_smbus_data *data, char read_write, 251static int i801_block_transaction(union i2c_smbus_data *data, char read_write,
252 int command) 252 int command, int hwpec)
253{ 253{
254 int i, len; 254 int i, len;
255 int smbcmd; 255 int smbcmd;
@@ -388,7 +388,7 @@ static int i801_block_transaction(union i2c_smbus_data *data, char read_write,
388 goto END; 388 goto END;
389 } 389 }
390 390
391 if(isich4 && command == I2C_SMBUS_BLOCK_DATA_PEC) { 391 if (hwpec && command == I2C_SMBUS_BLOCK_DATA) {
392 /* wait for INTR bit as advised by Intel */ 392 /* wait for INTR bit as advised by Intel */
393 timeout = 0; 393 timeout = 0;
394 do { 394 do {
@@ -456,9 +456,6 @@ static s32 i801_access(struct i2c_adapter * adap, u16 addr,
456 break; 456 break;
457 case I2C_SMBUS_BLOCK_DATA: 457 case I2C_SMBUS_BLOCK_DATA:
458 case I2C_SMBUS_I2C_BLOCK_DATA: 458 case I2C_SMBUS_I2C_BLOCK_DATA:
459 case I2C_SMBUS_BLOCK_DATA_PEC:
460 if(hwpec && size == I2C_SMBUS_BLOCK_DATA)
461 size = I2C_SMBUS_BLOCK_DATA_PEC;
462 outb_p(((addr & 0x7f) << 1) | (read_write & 0x01), 459 outb_p(((addr & 0x7f) << 1) | (read_write & 0x01),
463 SMBHSTADD); 460 SMBHSTADD);
464 outb_p(command, SMBHSTCMD); 461 outb_p(command, SMBHSTCMD);
@@ -476,7 +473,7 @@ static s32 i801_access(struct i2c_adapter * adap, u16 addr,
476 outb_p(1, SMBAUXCTL); /* enable HW PEC */ 473 outb_p(1, SMBAUXCTL); /* enable HW PEC */
477 } 474 }
478 if(block) 475 if(block)
479 ret = i801_block_transaction(data, read_write, size); 476 ret = i801_block_transaction(data, read_write, size, hwpec);
480 else { 477 else {
481 outb_p(xact | ENABLE_INT9, SMBHSTCNT); 478 outb_p(xact | ENABLE_INT9, SMBHSTCNT);
482 ret = i801_transaction(); 479 ret = i801_transaction();