Lines Matching +full:single +full:- +full:tt

1 // SPDX-License-Identifier: GPL-2.0-only
5 * SLD 9630 TT 1.1 and SLB 9635 TT 1.2 Trusted Platform Module
9 * Sirrix AG - security technologies <[email protected]> and
10 * Applied Data Security Group, Ruhr-University Bochum, Germany
11 * Project-Homepage: http://www.trust.rub.de/projects/linux-device-driver-infineon-tpm/
19 /* maximum number of WTX-packages */
21 /* msleep-Time for WTX-packages */
23 /* msleep-Time --> Interval to check status register */
25 /* gives number of max. msleep()-calls before throwing timeout */
182 return -EIO; in empty_fifo()
193 /* check the status-register if wait_for_bit is set */ in wait()
200 dev_err(&chip->dev, "Timeout in wait(STAT_XFE)\n"); in wait()
202 dev_err(&chip->dev, "Timeout in wait(STAT_RDA)\n"); in wait()
203 return -EIO; in wait()
214 /* Note: WTX means Waiting-Time-Extension. Whenever the TPM needs more
215 calculation time, it sends a WTX-package, which has to be acknowledged
217 creation. Set the maximum number of WTX-packages in the definitions
218 above, if the number is reached, the waiting-time will be denied
225 dev_info(&chip->dev, "Granting WTX (%02d / %02d)\n", in tpm_wtx()
236 dev_info(&chip->dev, "Aborting WTX\n"); in tpm_wtx_abort()
257 return -EIO; in tpm_inf_recv()
262 dev_err(&chip->dev, in tpm_inf_recv()
264 return -EIO; in tpm_inf_recv()
277 dev_err(&chip->dev, "Error handling on vendor layer!\n"); in tpm_inf_recv()
278 return -EIO; in tpm_inf_recv()
284 size = size - 6; in tpm_inf_recv()
289 dev_info(&chip->dev, "WTX-package received\n"); in tpm_inf_recv()
300 dev_info(&chip->dev, "WTX-abort acknowledged\n"); in tpm_inf_recv()
305 dev_err(&chip->dev, "ERROR-package received:\n"); in tpm_inf_recv()
307 dev_err(&chip->dev, in tpm_inf_recv()
308 "-> Negative acknowledgement" in tpm_inf_recv()
309 " - retransmit command!\n"); in tpm_inf_recv()
310 return -EIO; in tpm_inf_recv()
312 return -EIO; in tpm_inf_recv()
326 dev_err(&chip->dev, "Timeout while clearing FIFO\n"); in tpm_inf_send()
327 return -EIO; in tpm_inf_send()
332 return -EIO; in tpm_inf_send()
405 /* read IO-ports through PnP */ in tpm_inf_pnp_probe()
416 rc = -EINVAL; in tpm_inf_pnp_probe()
419 dev_info(&dev->dev, "Found %s with ID %s\n", in tpm_inf_pnp_probe()
420 dev->name, dev_id->id); in tpm_inf_pnp_probe()
422 rc = -EINVAL; in tpm_inf_pnp_probe()
428 rc = -EINVAL; in tpm_inf_pnp_probe()
434 rc = -EINVAL; in tpm_inf_pnp_probe()
445 dev_info(&dev->dev, "Found %s with ID %s\n", in tpm_inf_pnp_probe()
446 dev->name, dev_id->id); in tpm_inf_pnp_probe()
451 rc = -EINVAL; in tpm_inf_pnp_probe()
458 rc = -EINVAL; in tpm_inf_pnp_probe()
464 * a single large mem region with the device config in tpm_inf_pnp_probe()
472 rc = -EINVAL; in tpm_inf_pnp_probe()
493 chipname = " (SLD 9630 TT 1.1)"; in tpm_inf_pnp_probe()
496 chipname = " (SLB 9635 TT 1.2)"; in tpm_inf_pnp_probe()
505 /* configure TPM with IO-ports */ in tpm_inf_pnp_probe()
511 /* control if IO-ports are set correctly */ in tpm_inf_pnp_probe()
518 dev_err(&dev->dev, in tpm_inf_pnp_probe()
519 "Could not set IO-data registers to 0x%x\n", in tpm_inf_pnp_probe()
521 rc = -EIO; in tpm_inf_pnp_probe()
534 dev_info(&dev->dev, "TPM found: " in tpm_inf_pnp_probe()
551 chip = tpmm_chip_alloc(&dev->dev, &tpm_inf); in tpm_inf_pnp_probe()
563 rc = -ENODEV; in tpm_inf_pnp_probe()
599 /* Re-configure TPM after suspending */ in tpm_inf_resume()
629 MODULE_DESCRIPTION("Driver for Infineon TPM SLD 9630 TT 1.1 / SLB 9635 TT 1.2");