char: tpm: Keep TPM_INF_IO_PORT define for HAS_IOPORT=n
authorNiklas Schnelle <schnelle@linux.ibm.com>
Mon, 22 Apr 2024 12:37:11 +0000 (14:37 +0200)
committerJarkko Sakkinen <jarkko@kernel.org>
Thu, 9 May 2024 19:30:50 +0000 (22:30 +0300)
The recent change to handle HAS_IOPORT removed the TPM_INF_IO_PORT
define for the HAS_IOPORT=n case despite the define being used in
sections of code not covered by the same ifdef check. This was missed
because at the moment TCG_INFINEON indirectly depends on HAS_IOPORT via
PNP which depends on ACPI || ISA. As TCG_INFINEON does in principle
support MMIO only use add it for COMPILE_TEST to cover the HAS_IOPORT=n
case.

Link: https://lore.kernel.org/lkml/9d9fa267-067e-421b-9a39-aa178b913298@app.fastmail.com/
Fixes: dab56f80e7f9 ("char: tpm: handle HAS_IOPORT dependencies")
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/Kconfig
drivers/char/tpm/tpm_infineon.c

index 418c9ed59ffde7c61e40f6ace72ea35ee7a002ac..852bb9344788192eb60ef252a2f9f79f31b29518 100644 (file)
@@ -157,7 +157,7 @@ config TCG_ATMEL
 
 config TCG_INFINEON
        tristate "Infineon Technologies TPM Interface"
-       depends on PNP
+       depends on PNP || COMPILE_TEST
        help
          If you have a TPM security chip from Infineon Technologies
          (either SLD 9630 TT 1.1 or SLB 9635 TT 1.2) say Yes and it
index 99c6e565ec8d5391f010e7200aa84048c8f5bf7d..2d2ae37153ba00c3a1eacde3cf3daf8c76d4522a 100644 (file)
@@ -26,9 +26,7 @@
 #define        TPM_MAX_TRIES           5000
 #define        TPM_INFINEON_DEV_VEN_VALUE      0x15D1
 
-#ifdef CONFIG_HAS_IOPORT
 #define TPM_INF_IO_PORT                0x0
-#endif
 #define TPM_INF_IO_MEM         0x1
 
 #define TPM_INF_ADDR           0x0