coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
Go to the source code of this file.
Data Structures | |
struct | soc_amd_gpio |
struct | soc_amd_gpio_register_save |
struct | soc_amd_event |
struct | gpio_wake_state |
Typedefs | |
typedef uint32_t | gpio_t |
Functions | |
void | gpio_fill_wake_state (struct gpio_wake_state *state) |
void | gpio_add_events (void) |
static bool | is_gpio_event_level_triggered (uint32_t flags) |
static bool | is_gpio_event_edge_triggered (uint32_t flags) |
static bool | is_gpio_event_active_high (uint32_t flags) |
static bool | is_gpio_event_active_low (uint32_t flags) |
void | gpio_configure_pads_with_override (const struct soc_amd_gpio *base_cfg, size_t base_num_pads, const struct soc_amd_gpio *override_cfg, size_t override_num_pads) |
void | gpio_configure_pads (const struct soc_amd_gpio *gpio_list_ptr, size_t size) |
program a particular set of GPIO More... | |
int | gpio_interrupt_status (gpio_t gpio) |
void | soc_get_gpio_event_table (const struct soc_amd_event **table, size_t *items) |
void | gpio_save_pin_registers (gpio_t gpio, struct soc_amd_gpio_register_save *save) |
void | gpio_restore_pin_registers (gpio_t gpio, struct soc_amd_gpio_register_save *save) |
Definition at line 382 of file gpio.c.
References acpi_pm_state_for_elog(), ARRAY_SIZE, elog_add_event_wake(), ELOG_WAKE_SOURCE_GPIO, chipset_power_state::gpio_state, and MIN.
Referenced by fch_init().
void gpio_configure_pads | ( | const struct soc_amd_gpio * | gpio_list_ptr, |
size_t | size | ||
) |
program a particular set of GPIO
gpio_list_ptr | = pointer to array of gpio configurations |
size | = number of entries in array |
Definition at line 307 of file gpio.c.
References gpio_configure_pads_with_override(), and NULL.
Referenced by bootblock_mainboard_early_init(), bootblock_mainboard_init(), carrier_gpio_configure(), configure_early_gpio_pads(), configure_gpio_pads(), disable_unused_gpios(), disable_wifi_wake(), early_config_gpio(), early_lpc_init(), enable_i2s(), fw_config_handle(), init_mainboard(), mainboard_chip_init(), mainboard_config_gpios(), mainboard_config_stage_gpios(), mainboard_configure_early_gpios(), mainboard_configure_gpios(), mainboard_init(), mainboard_memory_init_params(), mainboard_program_early_gpios(), mainboard_program_emmc_gpios(), mainboard_program_gpios(), mainboard_romstage_entry(), mainboard_silicon_init_params(), mainboard_smi_sleep(), mb_pre_fspm(), mb_set_up_early_espi(), program_early_gpio_pads(), program_gpio_pads(), sb_reset_i2c_peripherals(), set_uart_config(), setup_gpio(), tpm_enable(), variant_configure_early_gpio_pads(), variant_configure_early_gpios(), variant_configure_gpios(), variant_early_gpio_configure(), variant_pcie_gpio_configure(), verstage_mainboard_espi_init(), verstage_mainboard_tpm_init(), wifi_power_reset_configure_active_high_power(), wifi_power_reset_configure_active_low_power(), and wifi_power_reset_configure_pre_v3().
void gpio_configure_pads_with_override | ( | const struct soc_amd_gpio * | base_cfg, |
size_t | base_num_pads, | ||
const struct soc_amd_gpio * | override_cfg, | ||
size_t | override_num_pads | ||
) |
Definition at line 262 of file gpio.c.
References c, soc_amd_gpio::gpio, GPIO_INTERRUPT_EN, GPIO_MASK_STS_EN, master_switch_clr(), master_switch_set(), and set_single_gpio().
Referenced by bootblock_mainboard_early_init(), bootblock_mainboard_init(), gpio_configure_pads(), mainboard_chip_init(), mainboard_configure_gpios(), mainboard_init(), mb_pre_fspm(), and verstage_mainboard_early_init().
void gpio_fill_wake_state | ( | struct gpio_wake_state * | state | ) |
Definition at line 362 of file gpio.c.
References BIOS_INFO, check_gpios(), GPIO_MASTER_SWITCH, gpio_read32(), GPIO_WAKE_STAT_0, GPIO_WAKE_STAT_1, memset(), and printk.
Referenced by fill_chipset_state().
int gpio_interrupt_status | ( | gpio_t | gpio | ) |
Definition at line 312 of file gpio.c.
References GPIO_INT_STATUS, gpio_read32(), GPIO_WAKE_STATUS, and gpio_write32().
Referenced by tis_plat_irq_status().
void gpio_restore_pin_registers | ( | gpio_t | gpio, |
struct soc_amd_gpio_register_save * | save | ||
) |
Definition at line 217 of file gpio.c.
References soc_amd_gpio_register_save::control_value, gpio_read32(), gpio_write32(), soc_amd_gpio_register_save::mux_value, and set_gpio_mux().
Referenced by sb_reset_i2c_peripherals().
void gpio_save_pin_registers | ( | gpio_t | gpio, |
struct soc_amd_gpio_register_save * | save | ||
) |
Definition at line 211 of file gpio.c.
References soc_amd_gpio_register_save::control_value, get_gpio_mux(), gpio_read32(), and soc_amd_gpio_register_save::mux_value.
Referenced by sb_reset_i2c_peripherals().
Definition at line 52 of file gpio.h.
References GPIO_FLAG_EVENT_ACTIVE_HIGH, and GPIO_FLAG_EVENT_ACTIVE_MASK.
Referenced by program_sci(), and program_smi().
Definition at line 57 of file gpio.h.
References GPIO_FLAG_EVENT_ACTIVE_LOW, and GPIO_FLAG_EVENT_ACTIVE_MASK.
Definition at line 47 of file gpio.h.
References GPIO_FLAG_EVENT_TRIGGER_EDGE, and GPIO_FLAG_EVENT_TRIGGER_MASK.
Definition at line 42 of file gpio.h.
References GPIO_FLAG_EVENT_TRIGGER_LEVEL, and GPIO_FLAG_EVENT_TRIGGER_MASK.
Referenced by program_sci(), and program_smi().
void soc_get_gpio_event_table | ( | const struct soc_amd_event ** | table, |
size_t * | items | ||
) |
Definition at line 35 of file gpio.c.
References ARRAY_SIZE, and gpio_event_table.
Referenced by set_single_gpio().