BACKPORT: tpm: Keep CLKRUN enabled throughout the duration of transmit_cmd()

Commit 5e572cab92f0bb5 ("tpm: Enable CLKRUN protocol for Braswell
systems") disabled CLKRUN protocol during TPM transactions and re-enabled
once the transaction is completed. But there were still some corner cases
observed where, reading of TPM header failed for savestate command
while going to suspend, which resulted in suspend failure.
To fix this issue keep the CLKRUN protocol disabled for the entire
duration of a single TPM command and not disabling and re-enabling
again for every TPM transaction. For the other TPM accesses outside
TPM command flow, add a higher level of disabling and re-enabling
the CLKRUN protocol, instead of doing for every TPM transaction.

Fixes: 5e572cab92f0bb5 ("tpm: Enable CLKRUN protocol for Braswell systems")

Conflicts:
	- Name of structure is priv_data instead tpm_tis_data

Signed-off-by: Azhar Shaikh <azhar.shaikh@intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
(cherry picked from commit b3e958ce4c585bf666de249dc794971ebc62d2d3)
Signed-off-by: Azhar Shaikh <azhar.shaikh@intel.com>

BUG=b:68224689
TEST=suspend_stress_test --memory_check passed 10000 iterations on cyan

Change-Id: Iaf2497098779c8d5359a5a9543921ce2e3147d81
Reviewed-on: https://chromium-review.googlesource.com/853633
Commit-Ready: Azhar Shaikh <azhar.shaikh@intel.com>
Tested-by: Jeremy Lin <jeremy.p.lin@intel.com>
Reviewed-by: Jeremy Lin <jeremy.p.lin@intel.com>
Reviewed-by: Andrey Pronin <apronin@chromium.org>
5 files changed