Attention is currently required from: Christian Walter, Hung-Te Lin, Jason Nien, Martin Roth, Yidi Lin, Yu-Ping Wu.
Grzegorz Bernacki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/75917?usp=email )
Change subject: mb/google: Move declaration of tis_plat_irq_status to cr50.h ......................................................................
mb/google: Move declaration of tis_plat_irq_status to cr50.h
tis_plat_irq_status() function is used only by Google TPM. It should be moved to drivers/tpm/cr50.h.
BUG=b:277787305 TEST=Build all affected platforms
Change-Id: I78dc39f2c7b44232b06947d3dfe6afa52807ced8 Signed-off-by: Grzegorz Bernacki bernacki@google.com --- M src/drivers/tpm/cr50.h M src/mainboard/google/asurada/chromeos.c M src/mainboard/google/cherry/chromeos.c M src/mainboard/google/corsola/chromeos.c M src/mainboard/google/geralt/chromeos.c M src/mainboard/google/gru/chromeos.c M src/mainboard/google/guybrush/variants/baseboard/tpm_tis.c M src/mainboard/google/herobrine/chromeos.c M src/mainboard/google/kahlee/variants/baseboard/tpm_tis.c M src/mainboard/google/kukui/chromeos.c M src/mainboard/google/myst/variants/baseboard/tpm_tis.c M src/mainboard/google/oak/tpm_tis.c M src/mainboard/google/skyrim/variants/baseboard/tpm_tis.c M src/mainboard/google/trogdor/chromeos.c M src/mainboard/google/zork/variants/baseboard/tpm_tis.c M src/security/tpm/tis.h M src/soc/intel/common/tpm_tis.c 17 files changed, 18 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/75917/1
diff --git a/src/drivers/tpm/cr50.h b/src/drivers/tpm/cr50.h index 7ff63fa..570ddd8 100644 --- a/src/drivers/tpm/cr50.h +++ b/src/drivers/tpm/cr50.h @@ -24,4 +24,7 @@ /* Wait for IRQ to indicate the TPM is ready */ enum cb_err cr50_wait_tpm_ready(void);
+/* Check tpm irq and clear it */ +int tis_plat_irq_status(void); + #endif /* __DRIVERS_TPM_CR50_H__ */ diff --git a/src/mainboard/google/asurada/chromeos.c b/src/mainboard/google/asurada/chromeos.c index 1aa8876..53c9ee8 100644 --- a/src/mainboard/google/asurada/chromeos.c +++ b/src/mainboard/google/asurada/chromeos.c @@ -2,8 +2,8 @@
#include <bootmode.h> #include <boot/coreboot_tables.h> +#include <drivers/tpm/cr50.h> #include <gpio.h> -#include <security/tpm/tis.h>
#include "gpio.h"
diff --git a/src/mainboard/google/cherry/chromeos.c b/src/mainboard/google/cherry/chromeos.c index 301a0bc..9c9e12f 100644 --- a/src/mainboard/google/cherry/chromeos.c +++ b/src/mainboard/google/cherry/chromeos.c @@ -2,8 +2,8 @@
#include <bootmode.h> #include <boot/coreboot_tables.h> +#include <drivers/tpm/cr50.h> #include <gpio.h> -#include <security/tpm/tis.h>
#include "gpio.h"
diff --git a/src/mainboard/google/corsola/chromeos.c b/src/mainboard/google/corsola/chromeos.c index 9717f9c..24a6d30 100644 --- a/src/mainboard/google/corsola/chromeos.c +++ b/src/mainboard/google/corsola/chromeos.c @@ -2,9 +2,9 @@
#include <bootmode.h> #include <boot/coreboot_tables.h> +#include <drivers/tpm/cr50.h> #include <ec/google/chromeec/ec.h> #include <gpio.h> -#include <security/tpm/tis.h> #include <stdbool.h>
#include "gpio.h" diff --git a/src/mainboard/google/geralt/chromeos.c b/src/mainboard/google/geralt/chromeos.c index a6e8917..a623ce77 100644 --- a/src/mainboard/google/geralt/chromeos.c +++ b/src/mainboard/google/geralt/chromeos.c @@ -2,8 +2,8 @@
#include <bootmode.h> #include <boot/coreboot_tables.h> +#include <drivers/tpm/cr50.h> #include <gpio.h> -#include <security/tpm/tis.h>
#include "gpio.h" #include "panel.h" diff --git a/src/mainboard/google/gru/chromeos.c b/src/mainboard/google/gru/chromeos.c index 479ca3d..05f989b 100644 --- a/src/mainboard/google/gru/chromeos.c +++ b/src/mainboard/google/gru/chromeos.c @@ -2,8 +2,8 @@
#include <bootmode.h> #include <boot/coreboot_tables.h> +#include <drivers/tpm/cr50.h> #include <gpio.h> -#include <security/tpm/tis.h>
#include "board.h"
diff --git a/src/mainboard/google/guybrush/variants/baseboard/tpm_tis.c b/src/mainboard/google/guybrush/variants/baseboard/tpm_tis.c index 2f3e426..f8bfb4f 100644 --- a/src/mainboard/google/guybrush/variants/baseboard/tpm_tis.c +++ b/src/mainboard/google/guybrush/variants/baseboard/tpm_tis.c @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
#include <boardid.h> +#include <drivers/tpm/cr50.h> #include <gpio.h> -#include <security/tpm/tis.h>
int tis_plat_irq_status(void) { diff --git a/src/mainboard/google/herobrine/chromeos.c b/src/mainboard/google/herobrine/chromeos.c index b5631fc..ce8f7ec 100644 --- a/src/mainboard/google/herobrine/chromeos.c +++ b/src/mainboard/google/herobrine/chromeos.c @@ -3,7 +3,7 @@ #include <boot/coreboot_tables.h> #include <bootmode.h> #include "board.h" -#include <security/tpm/tis.h> +#include <drivers/tpm/cr50.h>
void setup_chromeos_gpios(void) { diff --git a/src/mainboard/google/kahlee/variants/baseboard/tpm_tis.c b/src/mainboard/google/kahlee/variants/baseboard/tpm_tis.c index 2e3cfb8d..a8bf88f 100644 --- a/src/mainboard/google/kahlee/variants/baseboard/tpm_tis.c +++ b/src/mainboard/google/kahlee/variants/baseboard/tpm_tis.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <drivers/tpm/cr50.h> #include <gpio.h> -#include <security/tpm/tis.h> #include <variant/gpio.h>
int tis_plat_irq_status(void) diff --git a/src/mainboard/google/kukui/chromeos.c b/src/mainboard/google/kukui/chromeos.c index 4c4a8be..9bfeb50 100644 --- a/src/mainboard/google/kukui/chromeos.c +++ b/src/mainboard/google/kukui/chromeos.c @@ -2,8 +2,8 @@
#include <bootmode.h> #include <boot/coreboot_tables.h> +#include <drivers/tpm/cr50.h> #include <gpio.h> -#include <security/tpm/tis.h>
#include "gpio.h"
diff --git a/src/mainboard/google/myst/variants/baseboard/tpm_tis.c b/src/mainboard/google/myst/variants/baseboard/tpm_tis.c index d03158d..6c01179 100644 --- a/src/mainboard/google/myst/variants/baseboard/tpm_tis.c +++ b/src/mainboard/google/myst/variants/baseboard/tpm_tis.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
-#include <security/tpm/tis.h> +#include <drivers/tpm/cr50.h> #include <gpio.h>
int tis_plat_irq_status(void) diff --git a/src/mainboard/google/oak/tpm_tis.c b/src/mainboard/google/oak/tpm_tis.c index 9071869..58f5d45 100644 --- a/src/mainboard/google/oak/tpm_tis.c +++ b/src/mainboard/google/oak/tpm_tis.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <drivers/tpm/cr50.h> #include <gpio.h> -#include <security/tpm/tis.h>
#include "gpio.h"
diff --git a/src/mainboard/google/skyrim/variants/baseboard/tpm_tis.c b/src/mainboard/google/skyrim/variants/baseboard/tpm_tis.c index 7e513ef..e9af02a 100644 --- a/src/mainboard/google/skyrim/variants/baseboard/tpm_tis.c +++ b/src/mainboard/google/skyrim/variants/baseboard/tpm_tis.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
-#include <security/tpm/tis.h> +#include <drivers/tpm/cr50.h> #include <gpio.h>
int tis_plat_irq_status(void) diff --git a/src/mainboard/google/trogdor/chromeos.c b/src/mainboard/google/trogdor/chromeos.c index 11b38b5..38a2196 100644 --- a/src/mainboard/google/trogdor/chromeos.c +++ b/src/mainboard/google/trogdor/chromeos.c @@ -3,7 +3,7 @@ #include <boot/coreboot_tables.h> #include <bootmode.h> #include "board.h" -#include <security/tpm/tis.h> +#include <drivers/tpm/cr50.h>
void setup_chromeos_gpios(void) { diff --git a/src/mainboard/google/zork/variants/baseboard/tpm_tis.c b/src/mainboard/google/zork/variants/baseboard/tpm_tis.c index 97eac5d..29d2663 100644 --- a/src/mainboard/google/zork/variants/baseboard/tpm_tis.c +++ b/src/mainboard/google/zork/variants/baseboard/tpm_tis.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
+#include <drivers/tpm/cr50.h> #include <gpio.h> -#include <security/tpm/tis.h> #include <variant/gpio.h>
int tis_plat_irq_status(void) diff --git a/src/security/tpm/tis.h b/src/security/tpm/tis.h index 9b34333..fae049e 100644 --- a/src/security/tpm/tis.h +++ b/src/security/tpm/tis.h @@ -64,17 +64,6 @@ int tis_sendrecv(const u8 *sendbuf, size_t send_size, u8 *recvbuf, size_t *recv_len);
-/* TODO: This is supposed to be used only for Google TPM. - Consider moving this to drivers/tpm/cr50.h. */ -/* - * tis_plat_irq_status() - * - * Check tpm irq and clear it. - * - * Returns 1 when irq pending or 0 when not. - */ -int tis_plat_irq_status(void); - /* * tis_vendor_write() * diff --git a/src/soc/intel/common/tpm_tis.c b/src/soc/intel/common/tpm_tis.c index d761f14..e22cc43 100644 --- a/src/soc/intel/common/tpm_tis.c +++ b/src/soc/intel/common/tpm_tis.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h> -#include <security/tpm/tis.h> +#include <drivers/tpm/cr50.h>
int tis_plat_irq_status(void) {