coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
tpm_tis.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <boardid.h>
4 #include <security/tpm/tis.h>
5 #include <soc/gpio.h>
6 
8 {
9  gpio_t irq_gpio = GPIO_85;
10  uint32_t board_ver = board_id();
11 
12  if (CONFIG(BOARD_GOOGLE_GUYBRUSH) || (CONFIG(BOARD_GOOGLE_NIPPERKIN) && board_ver == 1))
13  irq_gpio = GPIO_3;
14 
15  return gpio_interrupt_status(irq_gpio);
16 }
@ CONFIG
Definition: dsi_common.h:201
uint32_t board_id(void)
board_id() - Get the board version
Definition: ec_boardid.c:6
int tis_plat_irq_status(void)
Definition: tpm_tis.c:7
#define GPIO_3
Definition: gpio.h:24
#define GPIO_85
Definition: gpio.h:61
int gpio_interrupt_status(gpio_t gpio)
Definition: gpio.c:312
unsigned int uint32_t
Definition: stdint.h:14