diff options
| author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-09-03 04:24:57 -0400 |
|---|---|---|
| committer | Wolfram Sang <wsa@the-dreams.de> | 2018-09-04 12:04:55 -0400 |
| commit | 851a15114895c5bce163a6f2d57e0aa4658a1be4 (patch) | |
| tree | a9c4d24c530f120a3f1fc299b8d76c44c32e0e84 /drivers | |
| parent | 20fdcd760a63ea66335c58bceb175e7712ab18ff (diff) | |
i2c: i801: fix DNV's SMBCTRL register offset
DNV's iTCO is slightly different with SMBCTRL sitting at a different
offset when compared to all other devices. Let's fix so that we can
properly use iTCO watchdog.
Fixes: 84d7f2ebd70d ("i2c: i801: Add support for Intel DNV")
Cc: <stable@vger.kernel.org> # v4.4+
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/i2c/busses/i2c-i801.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 04b60a349d7e..c91e145ef5a5 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c | |||
| @@ -140,6 +140,7 @@ | |||
| 140 | 140 | ||
| 141 | #define SBREG_BAR 0x10 | 141 | #define SBREG_BAR 0x10 |
| 142 | #define SBREG_SMBCTRL 0xc6000c | 142 | #define SBREG_SMBCTRL 0xc6000c |
| 143 | #define SBREG_SMBCTRL_DNV 0xcf000c | ||
| 143 | 144 | ||
| 144 | /* Host status bits for SMBPCISTS */ | 145 | /* Host status bits for SMBPCISTS */ |
| 145 | #define SMBPCISTS_INTS BIT(3) | 146 | #define SMBPCISTS_INTS BIT(3) |
| @@ -1399,7 +1400,11 @@ static void i801_add_tco(struct i801_priv *priv) | |||
| 1399 | spin_unlock(&p2sb_spinlock); | 1400 | spin_unlock(&p2sb_spinlock); |
| 1400 | 1401 | ||
| 1401 | res = &tco_res[ICH_RES_MEM_OFF]; | 1402 | res = &tco_res[ICH_RES_MEM_OFF]; |
| 1402 | res->start = (resource_size_t)base64_addr + SBREG_SMBCTRL; | 1403 | if (pci_dev->device == PCI_DEVICE_ID_INTEL_DNV_SMBUS) |
| 1404 | res->start = (resource_size_t)base64_addr + SBREG_SMBCTRL_DNV; | ||
| 1405 | else | ||
| 1406 | res->start = (resource_size_t)base64_addr + SBREG_SMBCTRL; | ||
| 1407 | |||
| 1403 | res->end = res->start + 3; | 1408 | res->end = res->start + 3; |
| 1404 | res->flags = IORESOURCE_MEM; | 1409 | res->flags = IORESOURCE_MEM; |
| 1405 | 1410 | ||
