| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2005, 2006 IBM Corporation |
|---|
| 3 | 4 | * Copyright (C) 2014, 2015 Intel Corporation |
|---|
| .. | .. |
|---|
| 13 | 14 | * |
|---|
| 14 | 15 | * This device driver implements the TPM interface as defined in |
|---|
| 15 | 16 | * the TCG TPM Interface Spec version 1.2, revision 1.0. |
|---|
| 16 | | - * |
|---|
| 17 | | - * This program is free software; you can redistribute it and/or |
|---|
| 18 | | - * modify it under the terms of the GNU General Public License as |
|---|
| 19 | | - * published by the Free Software Foundation, version 2 of the |
|---|
| 20 | | - * License. |
|---|
| 21 | 17 | */ |
|---|
| 22 | 18 | #include <linux/init.h> |
|---|
| 23 | 19 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 54 | 50 | return container_of(data, struct tpm_tis_tcg_phy, priv); |
|---|
| 55 | 51 | } |
|---|
| 56 | 52 | |
|---|
| 57 | | -#ifdef CONFIG_PREEMPT_RT_FULL |
|---|
| 53 | +#ifdef CONFIG_PREEMPT_RT |
|---|
| 58 | 54 | /* |
|---|
| 59 | 55 | * Flushes previous write operations to chip so that a subsequent |
|---|
| 60 | 56 | * ioread*()s won't stall a cpu. |
|---|
| .. | .. |
|---|
| 289 | 285 | return tpm_tis_init(&pnp_dev->dev, &tpm_info); |
|---|
| 290 | 286 | } |
|---|
| 291 | 287 | |
|---|
| 288 | +/* |
|---|
| 289 | + * There is a known bug caused by 93e1b7d42e1e ("[PATCH] tpm: add HID module |
|---|
| 290 | + * parameter"). This commit added IFX0102 device ID, which is also used by |
|---|
| 291 | + * tpm_infineon but ignored to add quirks to probe which driver ought to be |
|---|
| 292 | + * used. |
|---|
| 293 | + */ |
|---|
| 294 | + |
|---|
| 292 | 295 | static struct pnp_device_id tpm_pnp_tbl[] = { |
|---|
| 293 | 296 | {"PNP0C31", 0}, /* TPM */ |
|---|
| 294 | 297 | {"ATM1200", 0}, /* Atmel */ |
|---|
| .. | .. |
|---|
| 340 | 343 | } |
|---|
| 341 | 344 | tpm_info.res = *res; |
|---|
| 342 | 345 | |
|---|
| 343 | | - tpm_info.irq = platform_get_irq(pdev, 0); |
|---|
| 346 | + tpm_info.irq = platform_get_irq_optional(pdev, 0); |
|---|
| 344 | 347 | if (tpm_info.irq <= 0) { |
|---|
| 345 | 348 | if (pdev != force_pdev) |
|---|
| 346 | 349 | tpm_info.irq = -1; |
|---|