Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0894c653 authored by Felipe Balbi's avatar Felipe Balbi Committed by Greg Kroah-Hartman
Browse files

i2c: i801: fix DNV's SMBCTRL register offset



commit 851a15114895c5bce163a6f2d57e0aa4658a1be4 upstream.

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: 84d7f2eb ("i2c: i801: Add support for Intel DNV")
Cc: <stable@vger.kernel.org> # v4.4+
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Reviewed-by: default avatarJean Delvare <jdelvare@suse.de>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6c1a53fc
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@

#define SBREG_BAR		0x10
#define SBREG_SMBCTRL		0xc6000c
#define SBREG_SMBCTRL_DNV	0xcf000c

/* Host status bits for SMBPCISTS */
#define SMBPCISTS_INTS		0x08
@@ -1387,7 +1388,11 @@ static void i801_add_tco(struct i801_priv *priv)
	spin_unlock(&p2sb_spinlock);

	res = &tco_res[ICH_RES_MEM_OFF];
	if (pci_dev->device == PCI_DEVICE_ID_INTEL_DNV_SMBUS)
		res->start = (resource_size_t)base64_addr + SBREG_SMBCTRL_DNV;
	else
		res->start = (resource_size_t)base64_addr + SBREG_SMBCTRL;

	res->end = res->start + 3;
	res->flags = IORESOURCE_MEM;