diff options
author | nagendra modadugu <ngm@google.com> | 2016-06-28 03:44:59 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-06-30 03:11:19 -0700 |
commit | 1457ea2155f118d2e4127babadcdc417ad966db2 (patch) | |
tree | 3d4558bbefd004be99a0cb9c3792967e2b2298b1 /test | |
parent | b4671da5424d1209b721b96b6e484fd86a260a34 (diff) | |
download | chrome-ec-1457ea2155f118d2e4127babadcdc417ad966db2.tar.gz |
tpm test: use proper locality zero SPI bus addresses
The fix for SPI bus base address missed the tpm test driver, this patch
fixes the issue.
BRANCH=none
BUG=chrome-os-partner:54720
TEST=tpmtest.py connects over ftdi & tests pass
Change-Id: I5a59a6e089aee5a7c25466e0d183f3647c67343a
Signed-off-by: nagendra modadugu <ngm@google.com>
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/356556
Diffstat (limited to 'test')
-rw-r--r-- | test/tpm_test/ftdi_spi_tpm.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/tpm_test/ftdi_spi_tpm.c b/test/tpm_test/ftdi_spi_tpm.c index 2b9f30992a..69b6cf57da 100644 --- a/test/tpm_test/ftdi_spi_tpm.c +++ b/test/tpm_test/ftdi_spi_tpm.c @@ -18,11 +18,13 @@ static unsigned locality_; /* Set at initialization. */ static int ftdi_trace_enabled; /* 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_LOCALITY_0_SPI_BASE 0x00d40000 + +#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) static struct swig_string_data empty_string_data = (struct swig_string_data){ .size = 0, .data = NULL |