public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Jan Dabros <jsd@semihalf.com>,
	linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	andriy.shevchenko@linux.intel.com
Cc: mika.westerberg@linux.intel.com, rrangel@chromium.org,
	Nimesh.Easow@amd.com, upstream@semihalf.com
Subject: Re: [PATCH] i2c: designware: Modify timing parameters for amdpsp mailbox
Date: Thu, 28 Apr 2022 16:07:47 +0300	[thread overview]
Message-ID: <60218a3b-9b56-d9c1-a0f4-97c171a050ba@linux.intel.com> (raw)
In-Reply-To: <20220428122651.208575-1-jsd@semihalf.com>

On 4/28/22 15:26, Jan Dabros wrote:
> Adjust retry period and timeout values for x86-PSP mailbox based on the
> typical I2C traffic generated by PSP. In order to limit the possibility
> of timeouts, x86 should reduce the interval between retries as well as
> increase overall time after which it gives up.
> 
> Signed-off-by: Jan Dabros <jsd@semihalf.com>
> ---
>   drivers/i2c/busses/i2c-designware-amdpsp.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-designware-amdpsp.c b/drivers/i2c/busses/i2c-designware-amdpsp.c
> index 9b37f2b95abc..b624356c945f 100644
> --- a/drivers/i2c/busses/i2c-designware-amdpsp.c
> +++ b/drivers/i2c/busses/i2c-designware-amdpsp.c
> @@ -16,8 +16,8 @@
>   #define PSP_CMD_TIMEOUT_US	(500 * USEC_PER_MSEC)
>   
>   #define PSP_I2C_REQ_BUS_CMD		0x64
> -#define PSP_I2C_REQ_RETRY_CNT		10
> -#define PSP_I2C_REQ_RETRY_DELAY_US	(50 * USEC_PER_MSEC)
> +#define PSP_I2C_REQ_RETRY_CNT		400
> +#define PSP_I2C_REQ_RETRY_DELAY_US	(25 * USEC_PER_MSEC)
>   #define PSP_I2C_REQ_STS_OK		0x0
>   #define PSP_I2C_REQ_STS_BUS_BUSY	0x1
>   #define PSP_I2C_REQ_STS_INV_PARAM	0x3

Out of curiosity, can it be up to 400 * 25 ms = 10 s?

Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

  reply	other threads:[~2022-04-28 13:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 12:26 [PATCH] i2c: designware: Modify timing parameters for amdpsp mailbox Jan Dabros
2022-04-28 13:07 ` Jarkko Nikula [this message]
2022-04-28 13:42   ` Jan Dąbroś
2022-05-04 19:55 ` Wolfram Sang
2022-05-16 13:34   ` Jan Dąbroś

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=60218a3b-9b56-d9c1-a0f4-97c171a050ba@linux.intel.com \
    --to=jarkko.nikula@linux.intel.com \
    --cc=Nimesh.Easow@amd.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jsd@semihalf.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rrangel@chromium.org \
    --cc=upstream@semihalf.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox