All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: linux-i2c@vger.kernel.org, stable@vger.kernel.org,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Jarkko Nikula <jarkko.nikula@linux.intel.com>
Subject: Re: [PATCH v2] i2c: i801: fix DNV's SMBCTRL register offset
Date: Mon, 3 Sep 2018 11:02:51 +0200	[thread overview]
Message-ID: <20180903110251.7aef3fd0@endymion> (raw)
In-Reply-To: <20180903082457.26143-1-felipe.balbi@linux.intel.com>

On Mon,  3 Sep 2018 11:24:57 +0300, Felipe Balbi wrote:
> DNV's iTCO is slightly different with SMBCTRL sitting at a differnt

Typo: different.

> 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@vger.kernel.org> # v4.4+
> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
> ---
> 
> Changes since v1:
> 	- explicitly define DNV's register instead of adding an offset
> 
>  drivers/i2c/busses/i2c-i801.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
> index 941c223f6491..bdff45f99a56 100644
> --- a/drivers/i2c/busses/i2c-i801.c
> +++ b/drivers/i2c/busses/i2c-i801.c
> @@ -140,6 +140,7 @@
>  
>  #define SBREG_BAR		0x10
>  #define SBREG_SMBCTRL		0xc6000c
> +#define SBREG_SMBCTRL_DNV	0xcf000c
>  
>  /* Host status bits for SMBPCISTS */
>  #define SMBPCISTS_INTS		BIT(3)
> @@ -1399,7 +1400,11 @@ static void i801_add_tco(struct i801_priv *priv)
>  	spin_unlock(&p2sb_spinlock);
>  
>  	res = &tco_res[ICH_RES_MEM_OFF];
> -	res->start = (resource_size_t)base64_addr + SBREG_SMBCTRL;
> +	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;
>  

Reviewed-by: Jean Delvare <jdelvare@suse.de>

Thanks,
-- 
Jean Delvare
SUSE L3 Support

  reply	other threads:[~2018-09-03  9:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-03  5:37 [PATCH] i2c: i801: fix DNV's SMBCTRL register offset Felipe Balbi
2018-09-03  7:09 ` Jean Delvare
2018-09-03  8:24   ` [PATCH v2] " Felipe Balbi
2018-09-03  9:02     ` Jean Delvare [this message]
2018-09-03  9:04       ` Wolfram Sang
2018-09-04 16:04     ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180903110251.7aef3fd0@endymion \
    --to=jdelvare@suse.de \
    --cc=felipe.balbi@linux.intel.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.