Skip to content

Commit 851a151

Browse files
Felipe BalbiWolfram Sang
authored andcommitted
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: 84d7f2e ("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>
1 parent 20fdcd7 commit 851a151

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/i2c/busses/i2c-i801.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@
140140

141141
#define SBREG_BAR 0x10
142142
#define SBREG_SMBCTRL 0xc6000c
143+
#define SBREG_SMBCTRL_DNV 0xcf000c
143144

144145
/* Host status bits for SMBPCISTS */
145146
#define SMBPCISTS_INTS BIT(3)
@@ -1399,7 +1400,11 @@ static void i801_add_tco(struct i801_priv *priv)
13991400
spin_unlock(&p2sb_spinlock);
14001401

14011402
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+
14031408
res->end = res->start + 3;
14041409
res->flags = IORESOURCE_MEM;
14051410

0 commit comments

Comments
 (0)