]> git.baikalelectronics.ru Git - kernel.git/commit
tpm: Add tpm_tis_verify_crc to the tpm_tis_phy_ops protocol layer
authorAlexander Steffen <Alexander.Steffen@infineon.com>
Wed, 8 Jun 2022 17:31:12 +0000 (19:31 +0200)
committerJarkko Sakkinen <jarkko@kernel.org>
Wed, 3 Aug 2022 20:56:19 +0000 (23:56 +0300)
commit74fd220569b6f593c7160ff2f4ad66aeae0db83b
treee6b0e4eca4ed8a8f8ed6c70e6c28ffa4da8a6197
parent4171001476fc72fb41d23e41250b01b628651902
tpm: Add tpm_tis_verify_crc to the tpm_tis_phy_ops protocol layer

Some TPMs, e.g. those implementing the I2C variant of TIS, can verify
data transfers to/from the FIFO with a CRC. The CRC is calculated over
the entirety of the FIFO register. Since the phy_ops layer is not aware
when the core layer is done reading/writing the FIFO, CRC verification
must be triggered from the core layer. To this end, add an optional
phy_ops API call.

Co-developed-by: Johannes Holland <johannes.holland@infineon.com>
Signed-off-by: Johannes Holland <johannes.holland@infineon.com>
Signed-off-by: Alexander Steffen <Alexander.Steffen@infineon.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/tpm_tis_core.c
drivers/char/tpm/tpm_tis_core.h