From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: "Jan Dąbroś" <jsd@semihalf.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-i2c <linux-i2c@vger.kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Hans de Goede <hdegoede@redhat.com>,
Wolfram Sang <wsa@kernel.org>,
Raul E Rangel <rrangel@chromium.org>,
Marcin Wojtas <mw@semihalf.com>,
Grzegorz Jaszczyk <jaz@semihalf.com>,
upstream@semihalf.com, Tom Lendacky <thomas.lendacky@amd.com>,
"Deucher, Alexander" <alexander.deucher@amd.com>,
"Easow, Nimesh" <Nimesh.Easow@amd.com>,
"Limonciello, Mario" <mario.limonciello@amd.com>
Subject: Re: [PATCH v4 2/2] i2c: designware: Add AMD PSP I2C bus support
Date: Thu, 10 Feb 2022 16:43:48 +0200 [thread overview]
Message-ID: <87fcba54-b54a-ea20-63ba-f447f4d34506@linux.intel.com> (raw)
In-Reply-To: <CAOtMz3OJNopHKgKDvGNfVWwvvo57=LyiRcnT+x6TxwLb+hgkyw@mail.gmail.com>
On 2/10/22 10:18, Jan Dąbroś wrote:
> śr., 9 lut 2022 o 16:28 Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> napisał(a):
>>
>> On Tue, Feb 08, 2022 at 03:12:18PM +0100, Jan Dabros wrote:
>>
>> ...
>>
>> I have noticed code duplication.
>>
>>> + status = psp_send_i2c_req(PSP_I2C_REQ_ACQUIRE);
>>> + if (status) {
>>> + if (status == -ETIMEDOUT)
>>> + dev_err(psp_i2c_dev, "Timed out waiting for PSP to release I2C bus\n");
>>> + else
>>> + dev_err(psp_i2c_dev, "PSP communication error\n");
>>> +
>>> + dev_err(psp_i2c_dev, "Assume i2c bus is for exclusive host usage\n");
>>> + psp_i2c_mbox_fail = true;
>>> + goto cleanup;
>>> + }
>>
>>> + /* Send a release command to PSP */
>>> + status = psp_send_i2c_req(PSP_I2C_REQ_RELEASE);
>>> + if (status) {
>>> + if (status == -ETIMEDOUT)
>>> + dev_err(psp_i2c_dev, "Timed out waiting for PSP to acquire I2C bus\n");
>>> + else
>>> + dev_err(psp_i2c_dev, "PSP communication error\n");
>>> +
>>> + dev_err(psp_i2c_dev, "Assume i2c bus is for exclusive host usage\n");
>>> + psp_i2c_mbox_fail = true;
>>> + goto cleanup;
>>> + }
>>
>> If you are going to update the series, consider to introduce a common helper.
>> Otherwise, consider a follow up.
>
> Thanks for your comment. Since Jarkko is running some long-lasting
> tests with v4 patchset, I would like to keep this as is for now (and
> make a follow up commit). If there will be some additional comments
> for v4 from him and will spin v5 - I will introduce a common helper
> function then.
>
Test run fine overnight, although I wasn't expecting this breaking
Baytrail since patch is practically touching only semaphore detection at
probe time on Baytrail. I'm up to you would you address Andy's comments
as a follow up or as v5.
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
next prev parent reply other threads:[~2022-02-10 14:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 14:12 [PATCH v4 0/2] i2c-designware: Add support for AMD PSP semaphore Jan Dabros
2022-02-08 14:12 ` [PATCH v4 1/2] i2c: designware: Add missing locks Jan Dabros
2022-02-09 15:01 ` Jarkko Nikula
2022-02-09 15:23 ` Andy Shevchenko
2022-02-10 22:08 ` Wolfram Sang
2022-02-10 23:05 ` Jan Dąbroś
2022-02-08 14:12 ` [PATCH v4 2/2] i2c: designware: Add AMD PSP I2C bus support Jan Dabros
2022-02-09 15:27 ` Andy Shevchenko
2022-02-10 8:18 ` Jan Dąbroś
2022-02-10 14:43 ` Jarkko Nikula [this message]
2022-02-10 15:04 ` Jan Dąbroś
2022-02-10 22:09 ` Wolfram Sang
2022-02-10 23:05 ` Jan Dąbroś
2022-02-11 9:56 ` Wolfram Sang
2022-02-09 15:11 ` [PATCH v4 0/2] i2c-designware: Add support for AMD PSP semaphore Jarkko Nikula
2022-02-10 8:13 ` 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=87fcba54-b54a-ea20-63ba-f447f4d34506@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=Nimesh.Easow@amd.com \
--cc=alexander.deucher@amd.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=jaz@semihalf.com \
--cc=jsd@semihalf.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=mika.westerberg@linux.intel.com \
--cc=mw@semihalf.com \
--cc=rrangel@chromium.org \
--cc=thomas.lendacky@amd.com \
--cc=upstream@semihalf.com \
--cc=wsa@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox