[PATCH] i2c: i801: fix DNV's SMBCTRL register offset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



DNV's iTCO is slightly different with SMBCTRL sitting at a differnt
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@xxxxxxxxxxxxxxx> # v4.4+
Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx>
---
 drivers/i2c/busses/i2c-i801.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 941c223f6491..390bf253b6ea 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -1400,6 +1400,11 @@ static void i801_add_tco(struct i801_priv *priv)
 
 	res = &tco_res[ICH_RES_MEM_OFF];
 	res->start = (resource_size_t)base64_addr + SBREG_SMBCTRL;
+
+	/* DNV device has SMBCTRL at 0xcf000c */
+	if (pci_dev->device == PCI_DEVICE_ID_INTEL_DNV_SMBUS)
+		res->start += 0x90000;
+
 	res->end = res->start + 3;
 	res->flags = IORESOURCE_MEM;
 
-- 
2.18.0




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux