Skip to content

Commit

Permalink
[opentitantool] Fix crippled I2C TPM support
Browse files Browse the repository at this point in the history
Is seems that PR lowRISC#21289 introduced a bug that prevents `opentitantool
i2c tpm ...` from working at all.

This CL restores the proper use of `Any<>` to allow passing the I2C
driver object to the TPM command handler in the way that it expects.

Change-Id: I2b791de25666876c49dccccd83bdbc9369e608be
Signed-off-by: Jes B. Klinke <[email protected]>
  • Loading branch information
jesultra committed Feb 14, 2024
1 parent dc05d4c commit 4222d32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sw/host/opentitantool/src/command/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ impl CommandDispatch for I2cTpm {
Some(pin) => Some((transport.gpio_pin(pin)?, transport.gpio_monitoring()?)),
None => None,
};
let tpm_driver = Box::new(tpm::I2cDriver::new(
let tpm_driver: Box<dyn tpm::Driver> = Box::new(tpm::I2cDriver::new(
context.params.create(transport, "TPM")?,
ready_pin,
)?);
Expand Down

0 comments on commit 4222d32

Please sign in to comment.