diff options
author | Mauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com> | 2020-06-01 17:34:34 -0300 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2020-10-01 13:42:40 +1000 |
commit | 86660b06d12baf04588c79fe4fefde9ca554abdd (patch) | |
tree | 455916b00d50d78c846c61934d8b889e824023ec | |
parent | 48833b96098ce14260cdc9711b25ce424129f6a5 (diff) | |
download | skiboot-86660b06d12baf04588c79fe4fefde9ca554abdd.zip skiboot-86660b06d12baf04588c79fe4fefde9ca554abdd.tar.gz skiboot-86660b06d12baf04588c79fe4fefde9ca554abdd.tar.bz2 |
TPM/TSS: Register TPM chip for further use within TSS
TSS will know which device and transmit handler to use through this
registration, and the equivalent unregistering process.
Signed-off-by: Mauro S. M. Rodrigues <maurosr@linux.vnet.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
-rw-r--r-- | libstb/drivers/tpm_i2c_nuvoton.c | 1 | ||||
-rw-r--r-- | libstb/tpm_chip.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/libstb/drivers/tpm_i2c_nuvoton.c b/libstb/drivers/tpm_i2c_nuvoton.c index 9a26fca..9d3ff82 100644 --- a/libstb/drivers/tpm_i2c_nuvoton.c +++ b/libstb/drivers/tpm_i2c_nuvoton.c @@ -608,6 +608,7 @@ void tpm_i2c_nuvoton_probe(void) free(tpm_device); continue; } + tss_tpm_register(tpm_device, &tpm_i2c_nuvoton_driver); bus = i2c_find_bus_by_id(tpm_device->bus_id); assert(bus->check_quirk == NULL); bus->check_quirk = nuvoton_tpm_quirk; diff --git a/libstb/tpm_chip.c b/libstb/tpm_chip.c index 004750f..f90282f 100644 --- a/libstb/tpm_chip.c +++ b/libstb/tpm_chip.c @@ -213,6 +213,7 @@ void tpm_cleanup(void) tpm = list_pop(&tpm_list, struct tpm_chip, link); } + tss_tpm_unregister(); list_head_init(&tpm_list); } |