From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4D50C433F5 for ; Thu, 28 Apr 2022 13:08:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241958AbiD1NLN (ORCPT ); Thu, 28 Apr 2022 09:11:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229846AbiD1NLJ (ORCPT ); Thu, 28 Apr 2022 09:11:09 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FB75B0A6C; Thu, 28 Apr 2022 06:07:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651151271; x=1682687271; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=SJ2/jLDGpB14X2V0z6/tb8tFxo8ClzdlQrUjJQrpJ6k=; b=dMmArZomIsnfHGj0vxuj/BVmrX61FoefIJ/miEZwb8hUI+XNWOKFq65H fcWT1mRo9e1l8YeKZGgzC2tP0F0o7tq4I+R+uGJSWQYj7VpOOcwEHWr4J 8bJblhrZ3sLzJKv2lbaVBkeSs0xRQY501jQQHxH8+RtOw+9NxhCp9kTKK b+ywFXWhkI/YkZZOj0zUmGDKojgc2PGyl1vnU/IwoYc+Fbsv+c8Zh1ePx EPKhWb7zbVq/zxrIW+C5cMrouuP7MBkIlRwG8CxjUX5w11vMG6+/dT7zW CPg49sQ0oBph3CzLN4CwYJnvsASBJpNTXCjZ8qZSfISYgfK7Os8ORptsi g==; X-IronPort-AV: E=McAfee;i="6400,9594,10330"; a="266097474" X-IronPort-AV: E=Sophos;i="5.91,295,1647327600"; d="scan'208";a="266097474" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2022 06:07:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,295,1647327600"; d="scan'208";a="618124881" Received: from mylly.fi.intel.com (HELO [10.237.72.151]) ([10.237.72.151]) by fmsmga008.fm.intel.com with ESMTP; 28 Apr 2022 06:07:48 -0700 Message-ID: <60218a3b-9b56-d9c1-a0f4-97c171a050ba@linux.intel.com> Date: Thu, 28 Apr 2022 16:07:47 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.8.0 Subject: Re: [PATCH] i2c: designware: Modify timing parameters for amdpsp mailbox Content-Language: en-US To: Jan Dabros , 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 References: <20220428122651.208575-1-jsd@semihalf.com> From: Jarkko Nikula In-Reply-To: <20220428122651.208575-1-jsd@semihalf.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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