aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses
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
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')
-rw-r--r--drivers/i2c/busses/i2c-amd8111.c7
-rw-r--r--drivers/i2c/busses/i2c-i801.c13
-rw-r--r--drivers/i2c/busses/i2c-nforce2.c7
3 files changed, 5 insertions, 22 deletions
diff --git a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c
index aface7938a5b..f3b79a68dbec 100644
--- a/drivers/i2c/busses/i2c-amd8111.c
+++ b/drivers/i2c/busses/i2c-amd8111.c
@@ -253,13 +253,6 @@ static s32 amd8111_access(struct i2c_adapter * adap, u16 addr, unsigned short fl
253 read_write = I2C_SMBUS_READ; 253 read_write = I2C_SMBUS_READ;
254 break; 254 break;
255 255
256 case I2C_SMBUS_WORD_DATA_PEC:
257 case I2C_SMBUS_BLOCK_DATA_PEC:
258 case I2C_SMBUS_PROC_CALL_PEC:
259 case I2C_SMBUS_BLOCK_PROC_CALL_PEC:
260 dev_warn(&adap->dev, "Unexpected software PEC transaction %d\n.", size);
261 return -1;
262
263 default: 256 default:
264 dev_warn(&adap->dev, "Unsupported transaction %d\n", size); 257 dev_warn(&adap->dev, "Unsupported transaction %d\n", size);
265 return -1; 258 return -1;
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();
diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c
index 9b4247610815..fd26036e68a3 100644
--- a/drivers/i2c/busses/i2c-nforce2.c
+++ b/drivers/i2c/busses/i2c-nforce2.c
@@ -188,13 +188,6 @@ static s32 nforce2_access(struct i2c_adapter * adap, u16 addr,
188 dev_err(&adap->dev, "I2C_SMBUS_BLOCK_PROC_CALL not supported!\n"); 188 dev_err(&adap->dev, "I2C_SMBUS_BLOCK_PROC_CALL not supported!\n");
189 return -1; 189 return -1;
190 190
191 case I2C_SMBUS_WORD_DATA_PEC:
192 case I2C_SMBUS_BLOCK_DATA_PEC:
193 case I2C_SMBUS_PROC_CALL_PEC:
194 case I2C_SMBUS_BLOCK_PROC_CALL_PEC:
195 dev_err(&adap->dev, "Unexpected software PEC transaction %d\n.", size);
196 return -1;
197
198 default: 191 default:
199 dev_err(&adap->dev, "Unsupported transaction %d\n", size); 192 dev_err(&adap->dev, "Unsupported transaction %d\n", size);
200 return -1; 193 return -1;