]> git.sur5r.net Git - u-boot/blobdiff - lib/tpm-utils.h
common: print \n in initr_scsi()
[u-boot] / lib / tpm-utils.h
index bc98d1ef8f75d3a8916bda6940c3a81a4d5e26d6..a9cb7dc7ee5d8edad573e5698ace389f7179fc5e 100644 (file)
 /* Internal error of TPM command library */
 #define TPM_LIB_ERROR ((u32)~0u)
 
+/* To make strings of commands more easily */
+#define __MSB(x) ((x) >> 8)
+#define __LSB(x) ((x) & 0xFF)
+#define tpm_u16(x) __MSB(x), __LSB(x)
+#define tpm_u32(x) tpm_u16((x) >> 16), tpm_u16((x) & 0xFFFF)
+
 /**
  * tpm_open() - Request access to locality 0 for the caller
  *