|
146 | 146 | #define SMBHSTCFG_HST_EN 1 |
147 | 147 | #define SMBHSTCFG_SMB_SMI_EN 2 |
148 | 148 | #define SMBHSTCFG_I2C_EN 4 |
| 149 | +#define SMBHSTCFG_SPD_WD 0x10 |
149 | 150 |
|
150 | 151 | /* TCO configuration bits for TCOCTL */ |
151 | 152 | #define TCOCTL_EN 0x0100 |
@@ -865,9 +866,16 @@ static s32 i801_access(struct i2c_adapter *adap, u16 addr, |
865 | 866 | block = 1; |
866 | 867 | break; |
867 | 868 | case I2C_SMBUS_I2C_BLOCK_DATA: |
868 | | - /* NB: page 240 of ICH5 datasheet shows that the R/#W |
869 | | - * bit should be cleared here, even when reading */ |
870 | | - outb_p((addr & 0x7f) << 1, SMBHSTADD(priv)); |
| 869 | + /* |
| 870 | + * NB: page 240 of ICH5 datasheet shows that the R/#W |
| 871 | + * bit should be cleared here, even when reading. |
| 872 | + * However if SPD Write Disable is set (Lynx Point and later), |
| 873 | + * the read will fail if we don't set the R/#W bit. |
| 874 | + */ |
| 875 | + outb_p(((addr & 0x7f) << 1) | |
| 876 | + ((priv->original_hstcfg & SMBHSTCFG_SPD_WD) ? |
| 877 | + (read_write & 0x01) : 0), |
| 878 | + SMBHSTADD(priv)); |
871 | 879 | if (read_write == I2C_SMBUS_READ) { |
872 | 880 | /* NB: page 240 of ICH5 datasheet also shows |
873 | 881 | * that DATA1 is the cmd field when reading */ |
@@ -1573,6 +1581,8 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id) |
1573 | 1581 | /* Disable SMBus interrupt feature if SMBus using SMI# */ |
1574 | 1582 | priv->features &= ~FEATURE_IRQ; |
1575 | 1583 | } |
| 1584 | + if (temp & SMBHSTCFG_SPD_WD) |
| 1585 | + dev_info(&dev->dev, "SPD Write Disable is set\n"); |
1576 | 1586 |
|
1577 | 1587 | /* Clear special mode bits */ |
1578 | 1588 | if (priv->features & (FEATURE_SMBUS_PEC | FEATURE_BLOCK_BUFFER)) |
|
0 commit comments