aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/i2c/tpm/tpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/i2c/tpm/tpm.c')
-rw-r--r--src/drivers/i2c/tpm/tpm.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/drivers/i2c/tpm/tpm.c b/src/drivers/i2c/tpm/tpm.c
index 972b17de42..e804d6fc60 100644
--- a/src/drivers/i2c/tpm/tpm.c
+++ b/src/drivers/i2c/tpm/tpm.c
@@ -174,7 +174,8 @@ static int iic_tpm_write_generic(uint8_t addr, uint8_t *buffer, size_t len,
int count;
if (len > TPM_BUFSIZE) {
- printk(BIOS_DEBUG, "%s: Length %zd is too large\n", __func__, len);
+ printk(BIOS_DEBUG, "%s: Length %zd is too large\n",
+ __func__, len);
return -1;
}
@@ -313,7 +314,8 @@ static ssize_t get_burstcount(struct tpm_chip *chip)
int timeout = 2 * 1000; /* 2s timeout */
while (timeout) {
/* Note: STS is little endian */
- if (iic_tpm_read(TPM_STS(chip->vendor.locality) + 1, buf, 3) < 0)
+ if (iic_tpm_read(TPM_STS(chip->vendor.locality) + 1, buf, 3)
+ < 0)
burstcnt = 0;
else
burstcnt = (buf[2] << 16) + (buf[1] << 8) + buf[0];
@@ -473,7 +475,7 @@ out_err:
/* Initialization of I2C TPM */
-int tpm_vendor_probe(unsigned bus, uint32_t addr)
+int tpm_vendor_probe(unsigned int bus, uint32_t addr)
{
struct tpm_inf_dev *tpm_dev = car_get_var_ptr(&g_tpm_dev);
struct stopwatch sw;
@@ -515,7 +517,7 @@ int tpm_vendor_probe(unsigned bus, uint32_t addr)
return 0;
}
-int tpm_vendor_init(struct tpm_chip *chip, unsigned bus, uint32_t dev_addr)
+int tpm_vendor_init(struct tpm_chip *chip, unsigned int bus, uint32_t dev_addr)
{
struct tpm_inf_dev *tpm_dev = car_get_var_ptr(&g_tpm_dev);
uint32_t vendor;
@@ -557,7 +559,8 @@ int tpm_vendor_init(struct tpm_chip *chip, unsigned bus, uint32_t dev_addr)
} else if (be32_to_cpu(vendor) == TPM_TIS_I2C_DID_VID_9635) {
tpm_dev->chip_type = SLB9635;
} else {
- printk(BIOS_DEBUG, "Vendor ID 0x%08x not recognized.\n", vendor);
+ printk(BIOS_DEBUG, "Vendor ID 0x%08x not recognized.\n",
+ vendor);
goto out_err;
}