![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <boardid.h>
#include <bootmode.h>
#include <boot/coreboot_tables.h>
#include <console/console.h>
#include <delay.h>
#include <drivers/i2c/ww_ring/ww_ring.h>
#include <gpio.h>
#include <soc/cdp.h>
#include <soc/blsp.h>
#include <timer.h>
Go to the source code of this file.
Macros | |
#define | PP_SW 41 |
#define | WIPEOUT_MODE_DELAY_MS (8 * 1000) |
#define | RECOVERY_MODE_EXTRA_DELAY_MS (8 * 1000) |
Enumerations | |
enum | switch_state { not_probed = -1 , no_req , recovery_req , wipeout_req , not_probed = -1 , no_req , recovery_req , wipeout_req } |
Functions | |
static int | get_rec_sw_gpio_pin (void) |
static int | get_wp_status_gpio_pin (void) |
static int | read_gpio (gpio_t gpio_num) |
void | fill_lb_gpios (struct lb_gpios *gpios) |
static void | display_pattern (int pattern) |
static enum switch_state | get_switch_state (void) |
int | get_recovery_mode_switch (void) |
HACK: Use Fn-Key as recovery mode switch. More... | |
int | get_wipeout_mode_switch (void) |
int | get_write_protect_state (void) |
Only used if CONFIG(CHROMEOS) is set. More... | |
int | get_ec_is_trusted (void) |
#define PP_SW 41 |
Definition at line 14 of file chromeos.c.
#define RECOVERY_MODE_EXTRA_DELAY_MS (8 * 1000) |
Definition at line 89 of file chromeos.c.
#define WIPEOUT_MODE_DELAY_MS (8 * 1000) |
Definition at line 88 of file chromeos.c.
enum switch_state |
Enumerator | |
---|---|
not_probed | |
no_req | |
recovery_req | |
wipeout_req | |
not_probed | |
no_req | |
recovery_req | |
wipeout_req |
Definition at line 76 of file chromeos.c.
|
static |
Definition at line 83 of file chromeos.c.
References BLSP_QUP_ID_3, pattern, and ww_ring_display_pattern().
Definition at line 54 of file chromeos.c.
References ACTIVE_LOW, ARRAY_SIZE, lb_add_gpios(), PP_SW, and read_gpio().
int get_ec_is_trusted | ( | void | ) |
Definition at line 161 of file chromeos.c.
|
static |
Definition at line 16 of file chromeos.c.
References board_id(), BOARD_ID_GALE_EVT, BOARD_ID_GALE_EVT2_0, BOARD_ID_GALE_EVT2_1, BOARD_ID_GALE_EVT3, and BOARD_ID_GALE_PROTO.
int get_recovery_mode_switch | ( | void | ) |
HACK: Use Fn-Key as recovery mode switch.
Wait for sense register ready and read Fn-Key state.
Definition at line 146 of file chromeos.c.
References get_switch_state(), and recovery_req.
|
static |
Definition at line 83 of file chromeos.c.
Referenced by get_recovery_mode_switch(), and get_wipeout_mode_switch().
int get_wipeout_mode_switch | ( | void | ) |
Definition at line 151 of file chromeos.c.
|
static |
Definition at line 32 of file chromeos.c.
References board_id(), BOARD_ID_GALE_EVT, BOARD_ID_GALE_EVT2_0, BOARD_ID_GALE_EVT2_1, BOARD_ID_GALE_EVT3, and BOARD_ID_GALE_PROTO.
Referenced by 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 156 of file chromeos.c.
References get_wp_status_gpio_pin(), and read_gpio().
|
static |
Definition at line 46 of file chromeos.c.
References GPIO_2MA, GPIO_DISABLE, GPIO_FUNC_DISABLE, gpio_get(), GPIO_NO_PULL, gpio_tlmm_config_set(), and udelay().
Referenced by fill_lb_gpios(), and get_write_protect_state().