]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/tpm/tpm_tis_i2c.h
tpm: tpm_tis_i2c: Tidy up delays
[karo-tx-uboot.git] / drivers / tpm / tpm_tis_i2c.h
index db992000e4323e2fd7b6de3f607fcaac37634e00..ecdaf0cbd95312cf0a9e9c1b5a3a8fcd2e7b7fb9 100644 (file)
 #include <linux/types.h>
 
 enum tpm_timeout {
-       TPM_TIMEOUT = 5,        /* msecs */
+       TPM_TIMEOUT_MS                  = 5,
+       TIS_SHORT_TIMEOUT_MS            = 750,
+       TIS_LONG_TIMEOUT_MS             = 2000,
+       SLEEP_DURATION_US               = 60,
+       SLEEP_DURATION_LONG_US          = 210,
 };
 
 /* Size of external transmit buffer (used in tpm_transmit)*/
@@ -125,9 +129,6 @@ struct tpm_cmd_t {
  */
 #define MAX_COUNT_LONG         50
 
-#define SLEEP_DURATION         60      /* in usec */
-#define SLEEP_DURATION_LONG    210     /* in usec */
-
 #define TPM_HEADER_SIZE                10
 
 enum tis_access {
@@ -145,11 +146,6 @@ enum tis_status {
        TPM_STS_DATA_EXPECT             = 0x08,
 };
 
-enum tis_defaults {
-       TIS_SHORT_TIMEOUT               = 750,  /* ms */
-       TIS_LONG_TIMEOUT                = 2000, /* ms */
-};
-
 /* expected value for DIDVID register */
 #define TPM_TIS_I2C_DID_VID_9635 0x000b15d1L
 #define TPM_TIS_I2C_DID_VID_9645 0x001a15d1L
@@ -169,7 +165,7 @@ enum tpm_duration {
 /* Extended error numbers from linux (see errno.h) */
 #define ECANCELED      125     /* Operation Canceled */
 
-/* Timer frequency. Corresponds to msec timer resolution*/
+/* Timer frequency. Corresponds to msec timer resolution */
 #define HZ             1000
 
 #define TPM_MAX_ORDINAL                        243