![]() |
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 | gpio_drv_info |
struct | eint_section |
struct | eint_regs |
Enumerations | |
enum | pull_enable { GPIO_PULL_DISABLE = 0 , GPIO_PULL_ENABLE = 1 } |
enum | pull_select { GPIO_PULL_DOWN = 0 , GPIO_PULL_UP = 1 } |
enum | gpio_drv_adv { GPIO_DRV_ADV_125_UA = 0 , GPIO_DRV_ADV_250_UA = 1 , GPIO_DRV_ADV_500_UA = 2 , GPIO_DRV_ADV_1_MA = 3 } |
enum | gpio_irq_type { IRQ_TYPE_EDGE_RISING , IRQ_TYPE_EDGE_FALLING , IRQ_TYPE_LEVEL_HIGH , IRQ_TYPE_LEVEL_LOW , IRQ_TYPE_LEVEL , IRQ_TYPE_RISING_EDGE , IRQ_TYPE_FALLING_EDGE , IRQ_TYPE_DUAL_EDGE , IRQ_TYPE_LEVEL = 0 , IRQ_TYPE_RISING_EDGE = 1 , IRQ_TYPE_FALLING_EDGE = 2 , IRQ_TYPE_DUAL_EDGE = 3 , IRQ_TYPE_EDGE_RISING = 0 , IRQ_TYPE_EDGE_FALLING , IRQ_TYPE_LEVEL_HIGH , IRQ_TYPE_LEVEL_LOW } |
Functions | |
void | gpio_set_pull (gpio_t gpio, enum pull_enable enable, enum pull_select select) |
void | gpio_set_mode (gpio_t gpio, int mode) |
int | gpio_set_driving (gpio_t gpio, uint8_t drv) |
int | gpio_get_driving (gpio_t gpio) |
int | gpio_set_driving_adv (gpio_t gpio, enum gpio_drv_adv drv) |
int | gpio_get_driving_adv (gpio_t gpio) |
check_member (eint_regs, d1en, 0x420) | |
int | gpio_eint_poll (gpio_t gpio) |
void | gpio_eint_configure (gpio_t gpio, enum gpio_irq_type type) |
Variables | |
static struct eint_regs *const | mtk_eint = (void *)(EINT_BASE) |
enum gpio_drv_adv |
Enumerator | |
---|---|
GPIO_DRV_ADV_125_UA | |
GPIO_DRV_ADV_250_UA | |
GPIO_DRV_ADV_500_UA | |
GPIO_DRV_ADV_1_MA |
Definition at line 29 of file gpio_common.h.
enum gpio_irq_type |
Definition at line 54 of file gpio_common.h.
enum pull_enable |
Enumerator | |
---|---|
GPIO_PULL_DISABLE | |
GPIO_PULL_ENABLE |
Definition at line 11 of file gpio_common.h.
enum pull_select |
Enumerator | |
---|---|
GPIO_PULL_DOWN | |
GPIO_PULL_UP |
Definition at line 16 of file gpio_common.h.
check_member | ( | eint_regs | , |
d1en | , | ||
0x420 | |||
) |
void gpio_eint_configure | ( | gpio_t | gpio, |
enum gpio_irq_type | type | ||
) |
Definition at line 142 of file gpio.c.
References eint_regs::d0en, gpio_input_pullup(), IRQ_TYPE_EDGE_FALLING, IRQ_TYPE_EDGE_RISING, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_LOW, mask, eint_regs::mask_clr, mtk_eint, eint_regs::pol_clr, eint_regs::pol_set, pos_bit_calc_for_eint(), eint_section::regs, eint_regs::sens_clr, eint_regs::sens_set, type, and write32().
Referenced by bootblock_mainboard_init(), and mainboard_early_init().
int gpio_eint_poll | ( | gpio_t | gpio | ) |
Definition at line 126 of file gpio.c.
References eint_regs::ack, mtk_eint, pos_bit_calc_for_eint(), read32(), eint_section::regs, eint_regs::sta, and write32().
Referenced by tis_plat_irq_status().
int gpio_get_driving | ( | gpio_t | gpio | ) |
Definition at line 354 of file gpio.c.
References BIT, gpio_driving_info, gpio_find_reg_addr(), info, and read32().
Referenced by mtk_snfc_init().
int gpio_get_driving_adv | ( | gpio_t | gpio | ) |
Definition at line 393 of file gpio.c.
References BIT, gpio_driving_adv_info, gpio_find_reg_addr(), gpio_drv_info::offset, read32(), gpio_drv_info::shift, and gpio_drv_info::width.
Definition at line 324 of file gpio.c.
References BIT, clrbits32, clrsetbits32, gpio_driving_adv_info, gpio_driving_info, gpio_find_reg_addr(), info, is_valid_drv(), mask, gpio_drv_info::offset, gpio_drv_info::shift, and gpio_drv_info::width.
Referenced by mtk_snfc_init().
int gpio_set_driving_adv | ( | gpio_t | gpio, |
enum gpio_drv_adv | drv | ||
) |
Definition at line 366 of file gpio.c.
References BIT, clrsetbits32, gpio_driving_adv_info, gpio_find_reg_addr(), is_valid_drv_adv(), mask, gpio_drv_info::offset, gpio_drv_info::shift, and gpio_drv_info::width.
Definition at line 45 of file gpio.c.
References clrsetbits32, GPIO_MODE_BITS, mask, gpio_regs::mode, mtk_gpio, pos_bit_calc_for_mode(), and val_regs::val.
Referenced by __gpio_input(), __gpio_output(), configure_audio(), configure_i2s(), gpio_input(), gpio_input_pulldown(), gpio_input_pullup(), gpio_output(), i2c_set_gpio_pinmux(), mainboard_early_init(), mtk_i2c_set_gpio_pinmux(), mtk_pcie_set_pinmux(), mtk_snfc_init(), mtk_spi_set_gpio_pinmux(), nor_set_gpio_pinmux(), power_on_panel(), setup_pinmux(), and tegra_software_i2c_disable().
void gpio_set_pull | ( | gpio_t | gpio, |
enum pull_enable | enable, | ||
enum pull_select | select | ||
) |
Definition at line 17 of file gpio.c.
References assert, GPIO_PULL_DISABLE, GPIO_PULL_DOWN, gpio_set_pull_en_sel(), gpio_set_pull_pu_pd(), gpio_set_pull_pupd(), gpio_set_spec_pull_pupd(), mtk_gpio, pos_bit_calc(), gpio_regs::pullen, gpio_regs::pullsel, val_regs::rst, val_regs::set, and write16().
Referenced by configure_emmc(), exynos_dp_bridge_setup(), exynos_pinmux_dphpd(), exynos_pinmux_i2c(), exynos_pinmux_i2s0(), exynos_pinmux_i2s1(), exynos_pinmux_sdmmc(), exynos_pinmux_spi(), exynos_pinmux_sromc(), exynos_pinmux_uart(), gpio_init(), gpio_input(), gpio_input_irq(), gpio_input_pulldown(), gpio_input_pullup(), gpio_output(), gpio_read_mvl3(), mtk_i2c_set_gpio_pinmux(), mtk_msdc_configure_emmc(), mtk_msdc_configure_sdcard(), mtk_pcie_set_pinmux(), mtk_snfc_init(), nor_set_gpio_pinmux(), parade_dp_bridge_setup(), power_on_panel(), setup_gpio(), and setup_storage().
Definition at line 90 of file gpio_common.h.
Referenced by gpio_eint_configure(), and gpio_eint_poll().