linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Cc: Jarkko Sakkinen <jarkko@kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"peterhuewe@gmx.de" <peterhuewe@gmx.de>,
	"krzysztof.kozlowski+dt@linaro.org" 
	<krzysztof.kozlowski+dt@linaro.org>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"linux-integrity@vger.kernel.org"
	<linux-integrity@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Sowjanya Komatineni <skomatineni@nvidia.com>,
	Laxman Dewangan <ldewangan@nvidia.com>
Subject: Re: [Patch V5 2/3] tpm_tis-spi: Support hardware wait polling
Date: Wed, 1 Mar 2023 08:27:45 -0400	[thread overview]
Message-ID: <Y/9EwTtmxcVBjiHz@nvidia.com> (raw)
In-Reply-To: <DM4PR12MB576942B7C00F446BDF58D984C3AD9@DM4PR12MB5769.namprd12.prod.outlook.com>

On Wed, Mar 01, 2023 at 11:56:53AM +0000, Krishna Yarlagadda wrote:

> > > > +int tpm_tis_spi_transfer(struct tpm_tis_data *data, u32 addr, u16 len,
> > > > +			 u8 *in, const u8 *out)
> > > > +{
> > > > +	struct tpm_tis_spi_phy *phy = to_tpm_tis_spi_phy(data);
> > > > +	struct spi_controller *ctlr = phy->spi_device->controller;
> > > > +
> > > > +	/*
> > > > +	 * TPM flow control over SPI requires full duplex support.
> > > > +	 * Send entire message to a half duplex controller to handle
> > > > +	 * wait polling in controller.
> > > > +	 * Set TPM HW flow control flag..
> > > > +	 */
> > > > +	if (ctlr->flags & SPI_CONTROLLER_HALF_DUPLEX) {
> > > > +		phy->spi_device->mode |= SPI_TPM_HW_FLOW;
> > 
> > Shouldn't we check that this special flow is supported when the SPI
> > device is bound to the tpm in the first place?
> TPM device connected behind half duplex controller can only work
> this way. So, no additional flag needed to check.

Just because a DT hooks it up this way doesn't mean the kernel driver
can support it, eg support hasn't been implemented in an older SPI
driver or something.

If the failure mode is anything other than the TPM doesn't probe we
will need to check for support.

Jason

  reply	other threads:[~2023-03-01 12:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-27 12:06 [Patch V5 0/3] Tegra TPM driver with HW flow control Krishna Yarlagadda
2023-02-27 12:07 ` [Patch V5 1/3] spi: Add TPM HW flow flag Krishna Yarlagadda
2023-02-27 12:07 ` [Patch V5 2/3] tpm_tis-spi: Support hardware wait polling Krishna Yarlagadda
2023-02-28  2:36   ` Jarkko Sakkinen
2023-02-28  3:32     ` Krishna Yarlagadda
2023-03-01 23:17       ` Jarkko Sakkinen
2023-02-28 12:28     ` Jason Gunthorpe
2023-03-01 11:56       ` Krishna Yarlagadda
2023-03-01 12:27         ` Jason Gunthorpe [this message]
2023-03-01 12:37           ` Mark Brown
2023-03-01 13:39             ` Jason Gunthorpe
2023-03-01 13:45               ` Mark Brown
2023-03-01 14:09               ` Thierry Reding
2023-03-01 15:38                 ` Jason Gunthorpe
2023-02-27 12:07 ` [Patch V5 3/3] spi: tegra210-quad: Enable TPM " Krishna Yarlagadda
2023-02-28  2:28 ` [Patch V5 0/3] Tegra TPM driver with HW flow control Jarkko Sakkinen

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=Y/9EwTtmxcVBjiHz@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=broonie@kernel.org \
    --cc=jarkko@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kyarlagadda@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=robh+dt@kernel.org \
    --cc=skomatineni@nvidia.com \
    --cc=thierry.reding@gmail.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).