[Skiboot] [PATCH] tpm_i2c_nuvoton: check TPM vendor id register during probe
erichte at linux.ibm.com
Sat Mar 7 03:38:47 AEDT 2020
On 3/6/20 5:30 AM, Klaus Heinrich Kiwi wrote:
> On 3/5/2020 11:40 PM, Oliver O'Halloran wrote:
>>>> + free(tpm_device);
>>>> + continue;
>> One more thing: Should we be doing goto disable; here rather than
>> continue? The kernel will try to use the TPM later on since it's still
>> in the DT.
> This also caught my attention, as everywhere else we are jumping to outside the loop and aborting..
> but in this case, and if there are multiple "compatible=nuvoton,npct650" nodes, wouldn't we abort mid-probe when we encounter the first considered invalid? is that really what we want?
I don't think that behavior is desired, though at the moment I'm not aware of anything that may supply multiple TPMs. If we actually want to support multiple TPMs, the status should be set for each node. Probably out of scope for this patch though.
For now, I'll change the error state to jump to disable.
More information about the Skiboot