]>
Commit | Line | Data |
---|---|---|
7e59e1c3 GKH |
1 | From 851a15114895c5bce163a6f2d57e0aa4658a1be4 Mon Sep 17 00:00:00 2001 |
2 | From: Felipe Balbi <felipe.balbi@linux.intel.com> | |
3 | Date: Mon, 3 Sep 2018 11:24:57 +0300 | |
4 | Subject: i2c: i801: fix DNV's SMBCTRL register offset | |
5 | ||
6 | From: Felipe Balbi <felipe.balbi@linux.intel.com> | |
7 | ||
8 | commit 851a15114895c5bce163a6f2d57e0aa4658a1be4 upstream. | |
9 | ||
10 | DNV's iTCO is slightly different with SMBCTRL sitting at a different | |
11 | offset when compared to all other devices. Let's fix so that we can | |
12 | properly use iTCO watchdog. | |
13 | ||
14 | Fixes: 84d7f2ebd70d ("i2c: i801: Add support for Intel DNV") | |
15 | Cc: <stable@vger.kernel.org> # v4.4+ | |
16 | Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> | |
17 | Reviewed-by: Jean Delvare <jdelvare@suse.de> | |
18 | Signed-off-by: Wolfram Sang <wsa@the-dreams.de> | |
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
20 | ||
21 | --- | |
22 | drivers/i2c/busses/i2c-i801.c | 7 ++++++- | |
23 | 1 file changed, 6 insertions(+), 1 deletion(-) | |
24 | ||
25 | --- a/drivers/i2c/busses/i2c-i801.c | |
26 | +++ b/drivers/i2c/busses/i2c-i801.c | |
27 | @@ -135,6 +135,7 @@ | |
28 | ||
29 | #define SBREG_BAR 0x10 | |
30 | #define SBREG_SMBCTRL 0xc6000c | |
31 | +#define SBREG_SMBCTRL_DNV 0xcf000c | |
32 | ||
33 | /* Host status bits for SMBPCISTS */ | |
34 | #define SMBPCISTS_INTS 0x08 | |
35 | @@ -1387,7 +1388,11 @@ static void i801_add_tco(struct i801_pri | |
36 | spin_unlock(&p2sb_spinlock); | |
37 | ||
38 | res = &tco_res[ICH_RES_MEM_OFF]; | |
39 | - res->start = (resource_size_t)base64_addr + SBREG_SMBCTRL; | |
40 | + if (pci_dev->device == PCI_DEVICE_ID_INTEL_DNV_SMBUS) | |
41 | + res->start = (resource_size_t)base64_addr + SBREG_SMBCTRL_DNV; | |
42 | + else | |
43 | + res->start = (resource_size_t)base64_addr + SBREG_SMBCTRL; | |
44 | + | |
45 | res->end = res->start + 3; | |
46 | res->flags = IORESOURCE_MEM; | |
47 |