Improve tpm20 style

No functional changes to the code are applied.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
This commit is contained in:
mw 2019-04-16 02:46:21 +00:00
parent 79a9626e09
commit faf2f0725c
4 changed files with 97 additions and 94 deletions

View File

@ -142,7 +142,8 @@ tpm20_write(struct cdev *dev, struct uio *uio, int flags)
return (result);
}
static void tpm20_discard_buffer(void *arg)
static void
tpm20_discard_buffer(void *arg)
{
struct tpm_sc *sc;
@ -306,7 +307,8 @@ tpm20_save_state(device_t dev, bool suspend)
uint8_t save_cmd[] = {
0x80, 0x01, /* TPM_ST_NO_SESSIONS tag*/
0x00, 0x00, 0x00, 0x0C, /* cmd length */
0x00, 0x00, 0x01, 0x45, 0x00, 0x00 /* cmd TPM_CC_Shutdown */
0x00, 0x00, 0x01, 0x45, /* cmd TPM_CC_Shutdown */
0x00, 0x00 /* TPM_SU_STATE */
};
sc = device_get_softc(dev);

View File

@ -93,6 +93,7 @@ static bool tpmtis_go_ready(struct tpm_sc *sc);
static bool tpm_wait_for_u32(struct tpm_sc *sc, bus_size_t off,
uint32_t mask, uint32_t val, int32_t timeout);
static uint16_t tpmtis_wait_for_burst(struct tpm_sc *sc);
char *tpmtis_ids[] = {"MSFT0101", NULL};