diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-i801.c')
-rw-r--r-- | drivers/i2c/busses/i2c-i801.c | 13 |
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 | ||
104 | static int i801_transaction(void); | 104 | static int i801_transaction(void); |
105 | static int i801_block_transaction(union i2c_smbus_data *data, | 105 | static 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 | ||
108 | static unsigned short i801_smba; | 108 | static unsigned short i801_smba; |
109 | static struct pci_driver i801_driver; | 109 | static 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 */ |
251 | static int i801_block_transaction(union i2c_smbus_data *data, char read_write, | 251 | static 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(); |