summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/spi/tpm/tpm.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/drivers/spi/tpm/tpm.c b/src/drivers/spi/tpm/tpm.c
index a46042d431..b02fc5fbea 100644
--- a/src/drivers/spi/tpm/tpm.c
+++ b/src/drivers/spi/tpm/tpm.c
@@ -24,12 +24,14 @@
#include "tpm.h"
+#define TPM_LOCALITY_0_SPI_BASE 0x00d40000
+
/* Assorted TPM2 registers for interface type FIFO. */
-#define TPM_ACCESS_REG 0
-#define TPM_STS_REG 0x18
-#define TPM_DATA_FIFO_REG 0x24
-#define TPM_DID_VID_REG 0xf00
-#define TPM_RID_REG 0xf04
+#define TPM_ACCESS_REG (TPM_LOCALITY_0_SPI_BASE + 0)
+#define TPM_STS_REG (TPM_LOCALITY_0_SPI_BASE + 0x18)
+#define TPM_DATA_FIFO_REG (TPM_LOCALITY_0_SPI_BASE + 0x24)
+#define TPM_DID_VID_REG (TPM_LOCALITY_0_SPI_BASE + 0xf00)
+#define TPM_RID_REG (TPM_LOCALITY_0_SPI_BASE + 0xf04)
/* SPI Interface descriptor used by the driver. */
struct tpm_spi_if {