aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/tpm/tpm_atmel.h
diff options
context:
space:
mode:
authorJarkko Sakkinen2017-01-25 16:47:39 +0200
committerJarkko Sakkinen2017-02-03 22:03:14 +0200
commit1d1915532b3fb0d08aed8b2d8af1c6ea40846782 (patch)
treeffdf901d840c313bfa37909775c2fbdf7d1d6f5f /drivers/char/tpm/tpm_atmel.h
parent20f482ab9e0f800d1e01ce748ebd382d085abe56 (diff)
tpm: remove tpm_read_index and tpm_write_index from tpm.h
These are non-generic functions and do not belong to tpm.h. Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Diffstat (limited to 'drivers/char/tpm/tpm_atmel.h')
-rw-r--r--drivers/char/tpm/tpm_atmel.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm_atmel.h b/drivers/char/tpm/tpm_atmel.h
index 4f96d80cdce9..5c82eb47665e 100644
--- a/drivers/char/tpm/tpm_atmel.h
+++ b/drivers/char/tpm/tpm_atmel.h
@@ -96,6 +96,12 @@ enum tpm_atmel_addr {
TPM_ATMEL_BASE_ADDR_HI = 0x09
};
+static inline int tpm_read_index(int base, int index)
+{
+ outb(index, base);
+ return inb(base+1) & 0xFF;
+}
+
/* Verify this is a 1.1 Atmel TPM */
static int atmel_verify_tpm11(void)
{