Skip to content
Permalink
Browse files
tpm/tpm_i2c_infineon: Fix init endian vendor check
On my embedded system I use this tpm infineon chip via i2c bus.
The system is a MIPS architecture and therefore works in big endian mode.

The problem is, that the chip type is not correctly recognized,
because the vendor ID is wrongly aligned in the memory.

By declaring the vendor ID variable as a `__le32` type, the TPM chip is
then correctly recognized by the driver and feels then responsible.

The device works than as expected.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
  • Loading branch information
feckert authored and intel-lab-lkp committed Sep 13, 2021
1 parent 6880fa6 commit 454ecd483731a2a7c88ae1fa6e428f3c00c1669f
Showing 1 changed file with 1 addition and 1 deletion.
@@ -611,7 +611,7 @@ static const struct tpm_class_ops tpm_tis_i2c = {

static int tpm_tis_i2c_init(struct device *dev)
{
u32 vendor;
__le32 vendor;
int rc = 0;
struct tpm_chip *chip;

0 comments on commit 454ecd4

Please sign in to comment.