configs: aspeed: Make EXTRA_ENV_SETTINGS board specific
[platform/kernel/u-boot.git] / include / tpm-v2.h
index 13b3db6..ceff7d2 100644 (file)
@@ -396,6 +396,7 @@ enum {
        TPM_STS_DATA_EXPECT             = 1 << 3,
        TPM_STS_SELF_TEST_DONE          = 1 << 2,
        TPM_STS_RESPONSE_RETRY          = 1 << 1,
+       TPM_STS_READ_ZERO               = 0x23
 };
 
 enum {
@@ -641,4 +642,17 @@ u32 tpm2_write_lock(struct udevice *dev, u32 index);
  */
 u32 tpm2_disable_platform_hierarchy(struct udevice *dev);
 
+/**
+ * submit user specified data to the TPM and get response
+ *
+ * @dev                TPM device
+ * @sendbuf:   Buffer of the data to send
+ * @recvbuf:   Buffer to save the response to
+ * @recv_size: Pointer to the size of the response buffer
+ *
+ * @return code of the operation
+ */
+u32 tpm2_submit_command(struct udevice *dev, const u8 *sendbuf,
+                       u8 *recvbuf, size_t *recv_size);
+
 #endif /* __TPM_V2_H */