coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
chromeos.c File Reference
#include <bootmode.h>
#include <boot/coreboot_tables.h>
#include <gpio.h>
#include <security/tpm/tis.h>
#include "board.h"
Include dependency graph for chromeos.c:

Go to the source code of this file.

Functions

int get_write_protect_state (void)
 Only used if CONFIG(CHROMEOS) is set. More...
 
void fill_lb_gpios (struct lb_gpios *gpios)
 
void setup_chromeos_gpios (void)
 
int get_ec_is_trusted (void)
 

Variables

static const uint32_t wp_polarity
 

Function Documentation

◆ fill_lb_gpios()

void fill_lb_gpios ( struct lb_gpios gpios)

Definition at line 18 of file chromeos.c.

References ACTIVE_HIGH, ACTIVE_LOW, ARRAY_SIZE, GPIO_BACKLIGHT, GPIO_EC_IN_RW, GPIO_EC_IRQ, GPIO_RESET, GPIO_SPK_PA_EN, GPIO_TPM_IRQ, and lb_add_gpios().

Here is the call graph for this function:

◆ get_ec_is_trusted()

int get_ec_is_trusted ( void  )

Definition at line 53 of file chromeos.c.

References GPIO_EC_IN_RW, and gpio_get().

Here is the call graph for this function:

◆ get_write_protect_state()

int get_write_protect_state ( void  )

Only used if CONFIG(CHROMEOS) is set.

Always zero as the WP pin of the flash is tied high.

Definition at line 13 of file chromeos.c.

References gpio_get(), GPIO_WP, and wp_polarity.

Here is the call graph for this function:

◆ setup_chromeos_gpios()

void setup_chromeos_gpios ( void  )

Definition at line 36 of file chromeos.c.

References CONFIG, GPIO_EC_IN_RW, GPIO_EC_IRQ, gpio_input(), gpio_input_pullup(), and GPIO_WP.

Here is the call graph for this function:

Variable Documentation

◆ wp_polarity

const uint32_t wp_polarity
static
Initial value:
= CONFIG(GRU_BASEBOARD_SCARLET) ?
@ CONFIG
Definition: dsi_common.h:201
#define ACTIVE_HIGH
Definition: chromeos.c:18
#define ACTIVE_LOW
Definition: chromeos.c:17

Definition at line 10 of file chromeos.c.

Referenced by get_write_protect_state().