![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <bootmode.h>
#include <boot/coreboot_tables.h>
#include <ec/google/chromeec/ec.h>
#include <ec/google/chromeec/ec_commands.h>
#include <gpio.h>
#include "board.h"
Go to the source code of this file.
Macros | |
#define | GPIO_WP GPIO(7, A, 6) |
#define | GPIO_LID GPIO(0, A, 6) |
#define | GPIO_POWER GPIO(0, A, 5) |
#define | GPIO_RECOVERY GPIO(0, B, 1) |
#define | GPIO_ECINRW GPIO(0, A, 7) |
#define | GPIO_ECIRQ GPIO(7, A, 7) |
Functions | |
void | setup_chromeos_gpios (void) |
void | fill_lb_gpios (struct lb_gpios *gpios) |
int | get_recovery_mode_switch (void) |
HACK: Use Fn-Key as recovery mode switch. More... | |
int | get_write_protect_state (void) |
Only used if CONFIG(CHROMEOS) is set. More... | |
int | get_ec_is_trusted (void) |
#define GPIO_ECINRW GPIO(0, A, 7) |
Definition at line 15 of file chromeos.c.
#define GPIO_ECIRQ GPIO(7, A, 7) |
Definition at line 16 of file chromeos.c.
#define GPIO_LID GPIO(0, A, 6) |
Definition at line 12 of file chromeos.c.
#define GPIO_POWER GPIO(0, A, 5) |
Definition at line 13 of file chromeos.c.
#define GPIO_RECOVERY GPIO(0, B, 1) |
Definition at line 14 of file chromeos.c.
#define GPIO_WP GPIO(7, A, 6) |
Definition at line 11 of file chromeos.c.
Definition at line 27 of file chromeos.c.
References ACTIVE_HIGH, ACTIVE_LOW, ARRAY_SIZE, get_recovery_mode_switch(), GPIO_BACKLIGHT, GPIO_ECINRW, GPIO_ECIRQ, GPIO_LID, GPIO_POWER, GPIO_RECOVERY, GPIO_RESET, and lb_add_gpios().
int get_ec_is_trusted | ( | void | ) |
Definition at line 60 of file chromeos.c.
References GPIO_ECINRW, and gpio_get().
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 42 of file chromeos.c.
References EC_HOST_EVENT_KEYBOARD_RECOVERY, EC_HOST_EVENT_MASK, google_chromeec_get_events_b(), gpio_get(), and GPIO_RECOVERY.
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 55 of file chromeos.c.
References gpio_get(), and GPIO_WP.
Definition at line 18 of file chromeos.c.
References GPIO_ECIRQ, gpio_input(), gpio_input_pullup(), GPIO_LID, GPIO_POWER, GPIO_RECOVERY, and GPIO_WP.