lkml.org 
[lkml]   [2023]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch V6 3/3] spi: tegra210-quad: Enable TPM wait polling
On Mon, Feb 27, 2023 at 10:51:08PM +0530, Krishna Yarlagadda wrote:
> Trusted Platform Module requires flow control. As defined in TPM
> interface specification, client would drive MISO line at same cycle as
> last address bit on MOSI.
> Tegra241 QSPI controller has TPM wait state detection feature which is
> enabled for TPM client devices reported in SPI device mode bits.
> Set half duplex flag for TPM device to detect and send entire message
> to controller in one shot.
>
> Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
> ---
> drivers/spi/spi-tegra210-quad.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/spi/spi-tegra210-quad.c b/drivers/spi/spi-tegra210-quad.c
> index b967576b6c96..e1165584a20a 100644
> --- a/drivers/spi/spi-tegra210-quad.c
> +++ b/drivers/spi/spi-tegra210-quad.c
> @@ -142,6 +142,7 @@
>
> #define QSPI_GLOBAL_CONFIG 0X1a4
> #define QSPI_CMB_SEQ_EN BIT(0)
> +#define QSPI_TPM_WAIT_POLL_EN BIT(1)
>
> #define QSPI_CMB_SEQ_ADDR 0x1a8
> #define QSPI_ADDRESS_VALUE_SET(X) (((x) & 0xFFFF) << 0)
> @@ -164,6 +165,7 @@
> struct tegra_qspi_soc_data {
> bool has_dma;
> bool cmb_xfer_capable;
> + bool support_tpm;

Nit: this could be "supports_tpm" for slightly more consistency with
"has_dma".

Thierry
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-03-27 00:39    [W:0.084 / U:0.964 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site