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 <tpmdd@sirrix.com> 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 */
176 return -EIO; in empty_fifo()
187 /* check the status-register if wait_for_bit is set */ in wait()
194 dev_err(&chip->dev, "Timeout in wait(STAT_XFE)\n"); in wait()
196 dev_err(&chip->dev, "Timeout in wait(STAT_RDA)\n"); in wait()
197 return -EIO; in wait()
208 /* Note: WTX means Waiting-Time-Extension. Whenever the TPM needs more
209 calculation time, it sends a WTX-package, which has to be acknowledged
211 creation. Set the maximum number of WTX-packages in the definitions
212 above, if the number is reached, the waiting-time will be denied
219 dev_info(&chip->dev, "Granting WTX (%02d / %02d)\n", in tpm_wtx()
230 dev_info(&chip->dev, "Aborting WTX\n"); in tpm_wtx_abort()
251 return -EIO; in tpm_inf_recv()
256 dev_err(&chip->dev, in tpm_inf_recv()
258 return -EIO; in tpm_inf_recv()
271 dev_err(&chip->dev, "Error handling on vendor layer!\n"); in tpm_inf_recv()
272 return -EIO; in tpm_inf_recv()
278 size = size - 6; in tpm_inf_recv()
283 dev_info(&chip->dev, "WTX-package received\n"); in tpm_inf_recv()
294 dev_info(&chip->dev, "WTX-abort acknowledged\n"); in tpm_inf_recv()
299 dev_err(&chip->dev, "ERROR-package received:\n"); in tpm_inf_recv()
301 dev_err(&chip->dev, in tpm_inf_recv()
302 "-> Negative acknowledgement" in tpm_inf_recv()
303 " - retransmit command!\n"); in tpm_inf_recv()
304 return -EIO; in tpm_inf_recv()
306 return -EIO; in tpm_inf_recv()
320 dev_err(&chip->dev, "Timeout while clearing FIFO\n"); in tpm_inf_send()
321 return -EIO; in tpm_inf_send()
326 return -EIO; in tpm_inf_send()
399 /* read IO-ports through PnP */ in tpm_inf_pnp_probe()
410 rc = -EINVAL; in tpm_inf_pnp_probe()
413 dev_info(&dev->dev, "Found %s with ID %s\n", in tpm_inf_pnp_probe()
414 dev->name, dev_id->id); in tpm_inf_pnp_probe()
416 rc = -EINVAL; in tpm_inf_pnp_probe()
422 rc = -EINVAL; in tpm_inf_pnp_probe()
428 rc = -EINVAL; in tpm_inf_pnp_probe()
439 dev_info(&dev->dev, "Found %s with ID %s\n", in tpm_inf_pnp_probe()
440 dev->name, dev_id->id); in tpm_inf_pnp_probe()
445 rc = -EINVAL; in tpm_inf_pnp_probe()
452 rc = -EINVAL; in tpm_inf_pnp_probe()
458 * a single large mem region with the device config in tpm_inf_pnp_probe()
466 rc = -EINVAL; in tpm_inf_pnp_probe()
487 chipname = " (SLD 9630 TT 1.1)"; in tpm_inf_pnp_probe()
490 chipname = " (SLB 9635 TT 1.2)"; in tpm_inf_pnp_probe()
499 /* configure TPM with IO-ports */ in tpm_inf_pnp_probe()
505 /* control if IO-ports are set correctly */ in tpm_inf_pnp_probe()
512 dev_err(&dev->dev, in tpm_inf_pnp_probe()
513 "Could not set IO-data registers to 0x%x\n", in tpm_inf_pnp_probe()
515 rc = -EIO; in tpm_inf_pnp_probe()
528 dev_info(&dev->dev, "TPM found: " in tpm_inf_pnp_probe()
545 chip = tpmm_chip_alloc(&dev->dev, &tpm_inf); in tpm_inf_pnp_probe()
557 rc = -ENODEV; in tpm_inf_pnp_probe()
593 /* Re-configure TPM after suspending */ in tpm_inf_resume()
623 MODULE_DESCRIPTION("Driver for Infineon TPM SLD 9630 TT 1.1 / SLB 9635 TT 1.2");