[PATCH 2/2] tpm: add support for TPMv2.x I2C chips

Eddie James eajames at linux.ibm.com
Mon May 23 15:19:51 CEST 2022


On 5/23/22 01:12, Ilias Apalodimas wrote:
> Hi Eddie,
>
> Thanks for the patch.
>
> [...]
>
>> +static const struct tpm_tis_chip_data tpm_tis_std_chip_data = {
>> +	.pcr_count = 24,
>> +	.pcr_select_min = 3,
>> +};
>> +
>> +static const struct udevice_id tpm_tis_i2c_ids[] = {
>> +	{
>> +		.compatible = "nuvoton,npct75x",
>> +		.data = (ulong)&tpm_tis_std_chip_data,
>> +	},
>> +	{
>> +		.compatible = "tcg,tpm-tis-i2c",
>> +		.data = (ulong)&tpm_tis_std_chip_data,
>> +	},
>> +	{ }
>> +};
>> +
>> +U_BOOT_DRIVER(tpm_tis_i2c) = {
>> +	.name = "tpm_tis_i2c",
>> +	.id = UCLASS_TPM,
>> +	.of_match = tpm_tis_i2c_ids,
>> +	.ops = &tpm_tis_i2c_ops,
>> +	.probe = tpm_tis_i2c_probe,
>> +	.remove = tpm_tis_i2c_remove,
>> +	.priv_auto_alloc_size = sizeof(struct tpm_chip),
> Shouldn't this be .priv_auto only? IIRC we got rid of the
> .priv_auto_alloc_size a while back?  If so I can fix this while merging


Yes, I think so. I tested with an older u-boot (openbmc uses a modified 
v2019.04) with all the TPM core patches, and I think I missed this bit 
in rebasing.

Thanks,

Eddie


>
> Regards
> /Ilias
>
>> +};
>> -- 
>> 2.27.0
>>


More information about the U-Boot mailing list