From patchwork Mon Sep 3 05:37:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 965245 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 423f354WTJz9s3x for ; Mon, 3 Sep 2018 15:41:21 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726011AbeICJ7x (ORCPT ); Mon, 3 Sep 2018 05:59:53 -0400 Received: from mga18.intel.com ([134.134.136.126]:48801 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbeICJ7x (ORCPT ); Mon, 3 Sep 2018 05:59:53 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Sep 2018 22:41:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,323,1531810800"; d="scan'208";a="229728180" Received: from pipin.fi.intel.com (HELO localhost) ([10.237.72.128]) by orsmga004.jf.intel.com with ESMTP; 02 Sep 2018 22:41:18 -0700 From: Felipe Balbi To: Jean Delvare Cc: linux-i2c@vger.kernel.org, Felipe Balbi , stable@vger.kernel.org Subject: [PATCH] i2c: i801: fix DNV's SMBCTRL register offset Date: Mon, 3 Sep 2018 08:37:05 +0300 Message-Id: <20180903053705.9844-1-felipe.balbi@linux.intel.com> X-Mailer: git-send-email 2.18.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 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: # v4.4+ Signed-off-by: Felipe Balbi --- 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;