public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Guruvendra Punugupati <Guruvendra.Punugupati@amd.com>,
	Krishnamoorthi M <krishnamoorthi.m@amd.com>,
	linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 3/6] i3c: mipi-i3c-hci: Add a quirk to set PIO mode
Date: Fri, 23 Aug 2024 13:10:13 +0300	[thread overview]
Message-ID: <5a0ee0ce-c44a-426a-9019-bf801f22d8f6@linux.intel.com> (raw)
In-Reply-To: <20240821133554.391937-4-Shyam-sundar.S-k@amd.com>

On 8/21/24 4:35 PM, Shyam Sundar S K wrote:
> The AMD HCI controller currently only supports PIO mode but exposes DMA
> rings to the OS, which leads to the controller being configured in DMA
> mode. To address this, add a quirk to avoid configuring the controller in
> DMA mode and default to PIO mode.
> 
> Additionally, introduce a generic quirk infrastructure to the mipi-i3c-hci
> driver to facilitate seamless future quirk additions.
> 
> Co-developed-by: Krishnamoorthi M <krishnamoorthi.m@amd.com>
> Signed-off-by: Krishnamoorthi M <krishnamoorthi.m@amd.com>
> Co-developed-by: Guruvendra Punugupati <Guruvendra.Punugupati@amd.com>
> Signed-off-by: Guruvendra Punugupati <Guruvendra.Punugupati@amd.com>
> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
> ---
>   drivers/i3c/master/mipi-i3c-hci/core.c | 9 ++++++++-
>   drivers/i3c/master/mipi-i3c-hci/hci.h  | 1 +
>   2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c
> index d1952a5619d4..3aa4aa9deb56 100644
> --- a/drivers/i3c/master/mipi-i3c-hci/core.c
> +++ b/drivers/i3c/master/mipi-i3c-hci/core.c
> @@ -754,6 +754,11 @@ static int i3c_hci_init(struct i3c_hci *hci)
>   		return -EINVAL;
>   	}
>   
> +	/* Quirk for HCI_QUIRK_PIO_MODE on AMD platforms */
> +	regval = reg_read(HCI_VERSION);
> +	if (hci->quirks & HCI_QUIRK_PIO_MODE)
> +		hci->RHS_regs = NULL;
> +
>   	/* Try activating DMA operations first */
>   	if (hci->RHS_regs) {
>   		reg_clear(HC_CONTROL, HC_CONTROL_PIO_MODE);

This looks otherwise ok to me but with "regval = reg_read(HCI_VERSION);" 
removed. I commented that in the patch 2/6.

  reply	other threads:[~2024-08-23 10:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21 13:35 [PATCH v4 0/6] Introduce initial AMD I3C HCI driver support Shyam Sundar S K
2024-08-21 13:35 ` [PATCH v4 1/6] i3c: mipi-i3c-hci: Add AMDI5017 ACPI ID to the I3C Support List Shyam Sundar S K
2024-08-21 13:37   ` Shyam Sundar S K
2024-08-21 13:56     ` Andy Shevchenko
2024-08-21 15:12       ` Shyam Sundar S K
2024-08-21 15:39         ` Andy Shevchenko
2024-08-21 15:42           ` Andy Shevchenko
2024-08-21 15:43             ` Andy Shevchenko
2024-08-21 17:22               ` Shyam Sundar S K
2024-08-21 17:18           ` Shyam Sundar S K
2024-08-21 13:35 ` [PATCH v4 2/6] i3c: mipi-i3c-hci: Read HC_CONTROL_PIO_MODE only after i3c hci v1.1 Shyam Sundar S K
2024-08-23  8:50   ` Jarkko Nikula
2024-08-21 13:35 ` [PATCH v4 3/6] i3c: mipi-i3c-hci: Add a quirk to set PIO mode Shyam Sundar S K
2024-08-23 10:10   ` Jarkko Nikula [this message]
2024-08-21 13:35 ` [PATCH v4 4/6] i3c: mipi-i3c-hci: Relocate helper macros to HCI header file Shyam Sundar S K
2024-08-21 13:35 ` [PATCH v4 5/6] i3c: mipi-i3c-hci: Add a quirk to set timing parameters Shyam Sundar S K
2024-08-23 10:11   ` Jarkko Nikula
2024-08-21 13:35 ` [PATCH v4 6/6] i3c: mipi-i3c-hci: Add a quirk to set Response buffer threshold Shyam Sundar S K
2024-08-23 10:13   ` Jarkko Nikula

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=5a0ee0ce-c44a-426a-9019-bf801f22d8f6@linux.intel.com \
    --to=jarkko.nikula@linux.intel.com \
    --cc=Guruvendra.Punugupati@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=krishnamoorthi.m@amd.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox