From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: "Mario Limonciello" <mario.limonciello@amd.com>,
"Jan Dąbroś" <jsd@semihalf.com>,
"Grzegorz Bernacki" <gjb@semihalf.com>,
Rijo-john.Thomas@amd.com, Thomas.Lendacky@amd.com,
herbert@gondor.apana.org.au,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Mika Westerberg" <mika.westerberg@linux.intel.com>
Cc: Felix.Held@amd.com, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 8/8] i2c: designware: Add doorbell support for Skyrim
Date: Mon, 13 Mar 2023 12:29:50 +0200 [thread overview]
Message-ID: <b18aefc2-dd07-5356-0d19-b4783ed500e6@linux.intel.com> (raw)
In-Reply-To: <20230310211954.2490-9-mario.limonciello@amd.com>
On 3/10/23 23:19, Mario Limonciello wrote:
> Skyrim and later platform don't use the platform feature mailbox for
> communication for I2C arbitration, they rely upon ringing a doorbell.
>
> Detect the platform by the device ID of the root port and choose the
> appropriate method.
>
> Link: https://lore.kernel.org/linux-i2c/20220916131854.687371-3-jsd@semihalf.com/
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> v3->v4:
> * Adjust to use PCI device ID and function pointers instead
> v2->v3:
> * Use CPU ID rather than ACPI ID, this will be pushed to a later patch
> v1->v2:
> * New patch
> ---
> drivers/i2c/busses/i2c-designware-amdpsp.c | 40 ++++++++++++++++------
> 1 file changed, 30 insertions(+), 10 deletions(-)
>
...
> @@ -276,6 +289,13 @@ int i2c_dw_amdpsp_probe_lock_support(struct dw_i2c_dev *dev)
> if (psp_i2c_dev)
> return -EEXIST;
>
> + /* Cezanne uses platform mailbox, Skyrim and later use doorbell */
> + rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
> + if (rdev->device == 0x1630)
> + _psp_send_i2c_req = psp_send_i2c_req_cezanne;
> + else
> + _psp_send_i2c_req = psp_send_i2c_req_skyrim;
> +
Is there any possibility pci_get_domain_bus_and_slot() returns NULL? Or
is 00:00.0 always present?
next prev parent reply other threads:[~2023-03-13 10:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 21:19 [PATCH v4 0/8] Export platform features from ccp driver Mario Limonciello
2023-03-10 21:19 ` [PATCH v4 2/8] crypto: ccp: Add a header for multiple drivers to use `__psp_pa` Mario Limonciello
2023-03-10 21:19 ` [PATCH v4 3/8] crypto: ccp: Move some PSP mailbox bit definitions into common header Mario Limonciello
2023-03-13 10:30 ` Jarkko Nikula
2023-03-10 21:19 ` [PATCH v4 6/8] i2c: designware: Use PCI PSP driver for communication Mario Limonciello
2023-03-13 10:30 ` Jarkko Nikula
2023-03-15 10:28 ` Grzegorz Bernacki
2023-03-10 21:19 ` [PATCH v4 8/8] i2c: designware: Add doorbell support for Skyrim Mario Limonciello
2023-03-13 10:29 ` Jarkko Nikula [this message]
2023-03-13 11:34 ` Andy Shevchenko
2023-03-20 19:04 ` Mark Hasemeyer
2023-03-20 19:31 ` Mark Hasemeyer
2023-03-17 3:26 ` [PATCH v4 0/8] Export platform features from ccp driver Herbert Xu
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=b18aefc2-dd07-5356-0d19-b4783ed500e6@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=Felix.Held@amd.com \
--cc=Rijo-john.Thomas@amd.com \
--cc=Thomas.Lendacky@amd.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gjb@semihalf.com \
--cc=herbert@gondor.apana.org.au \
--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 \
/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;
as well as URLs for NNTP newsgroup(s).