Re: [PATCH v4 1/4] tpm/tpm_crb: implement tpm crb idle state
From: Jarkko Sakkinen
Date: Sat Oct 08 2016 - 12:30:55 EST
On Sat, Oct 08, 2016 at 02:59:36PM +0300, Tomas Winkler wrote:
> From: "Winkler, Tomas" <tomas.winkler@xxxxxxxxx>
>
> The register TPM_CRB_CTRL_REQ_x contains bits goIdle and cmdReady for
> SW to indicate that the device can enter or should exit the idle state.
>
> The legacy ACPI-start (SMI + DMA) based devices do not support these
> bits and the idle state management is not exposed to the host SW.
> Thus, this functionality only is enabled only for a CRB start (MMIO)
> based devices.
>
> Based on Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxxxxxxxx>
> original patch:
> 'tpm_crb: implement power tpm crb power management'
>
> To keep the implementation local to the hw we don't use wait_for_tpm_stat
> for polling the TPM_CRB_CTRL_REQ.
I just realized that the HW specific argument does not hold at all. The
tpm_tis_core heavily uses wait_for_tpm_stat and return value of status
is synthetized.
It's upper layer for FIFO implemetations but still the arguement still
holds.
Lets keep it the way it is for now because this is fairly well test but
I might consider sending patch that migrates to wait_for_tpm_stat unless
there is no real reason not to do so.
/Jarkko