![]() |
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.
Enumerations | |
enum | { GPIO_DIRECTION_IN = 0 , GPIO_DIRECTION_OUT = 1 } |
enum | { GPIO_MODE = 0 } |
enum | { MAX_EINT_REG_BITS = 32 } |
Functions | |
static void | pos_bit_calc (gpio_t gpio, u32 *pos, u32 *bit) |
static void | pos_bit_calc_for_mode (gpio_t gpio, u32 *pos, u32 *bit) |
static s32 | gpio_set_dir (gpio_t gpio, u32 dir) |
void | gpio_set_mode (gpio_t gpio, int mode) |
int | gpio_get (gpio_t gpio) |
void | gpio_set (gpio_t gpio, int output) |
void | gpio_input_pulldown (gpio_t gpio) |
void | gpio_input_pullup (gpio_t gpio) |
void | gpio_input (gpio_t gpio) |
void | gpio_output (gpio_t gpio, int value) |
static void | pos_bit_calc_for_eint (gpio_t gpio, u32 *pos, u32 *bit) |
int | gpio_eint_poll (gpio_t gpio) |
void | gpio_eint_configure (gpio_t gpio, enum gpio_irq_type type) |
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 | ( | gpio_t | gpio | ) |
Definition at line 56 of file gpio.c.
References gpio_regs::din, mtk_gpio, pos_bit_calc(), read32(), and val_regs::val.
Definition at line 101 of file gpio.c.
References GPIO_DIRECTION_IN, GPIO_MODE, GPIO_PULL_DISABLE, GPIO_PULL_DOWN, gpio_set_dir(), gpio_set_mode(), and gpio_set_pull().
Definition at line 87 of file gpio.c.
References GPIO_DIRECTION_IN, GPIO_MODE, GPIO_PULL_DOWN, GPIO_PULL_ENABLE, gpio_set_dir(), gpio_set_mode(), and gpio_set_pull().
Definition at line 94 of file gpio.c.
References GPIO_DIRECTION_IN, GPIO_MODE, GPIO_PULL_ENABLE, GPIO_PULL_UP, gpio_set_dir(), gpio_set_mode(), and gpio_set_pull().
Definition at line 108 of file gpio.c.
References GPIO_DIRECTION_OUT, GPIO_MODE, GPIO_PULL_DISABLE, GPIO_PULL_DOWN, gpio_set(), gpio_set_dir(), gpio_set_mode(), gpio_set_pull(), and value.
Definition at line 71 of file gpio.c.
References gpio_regs::dout, mtk_gpio, pos_bit_calc(), val_regs::rst, val_regs::set, and write32().
Definition at line 27 of file gpio.c.
References gpio_regs::dir, GPIO_DIRECTION_IN, mtk_gpio, pos_bit_calc(), val_regs::rst, val_regs::set, and write32().
Referenced by gpio_input(), gpio_input_pulldown(), gpio_input_pullup(), and gpio_output().
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().
Definition at line 15 of file gpio.c.
References MAX_GPIO_REG_BITS.
Referenced by gpio_get(), gpio_set(), and gpio_set_dir().
Definition at line 120 of file gpio.c.
References MAX_EINT_REG_BITS.
Referenced by gpio_eint_configure(), and gpio_eint_poll().
Definition at line 21 of file gpio.c.
References GPIO_MODE_BITS, and MAX_GPIO_MODE_PER_REG.
Referenced by gpio_set_mode().