![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <types.h>
Go to the source code of this file.
Data Structures | |
struct | rockchip_gpio_regs |
union | gpio_t |
Macros | |
#define | GPIO(p, b, i) ((gpio_t){.port = p, .bank = GPIO_##b, .idx = i}) |
Enumerations | |
enum | { GPIO_A = 0 , GPIO_B , GPIO_C , GPIO_D } |
enum | gpio_pull { GPIO_NO_PULL , GPIO_PULL_DOWN , GPIO_KEEPER , GPIO_PULL_UP , GPIO_PULLNONE = 0 , GPIO_PULLUP = 1 , GPIO_PULLDOWN = 2 } |
enum | gpio_dir { GPIO_INPUT = 0 , GPIO_OUTPUT = 1 } |
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 | |
check_member (rockchip_gpio_regs, ls_sync, 0x60) | |
int | is_pmu_gpio (gpio_t gpio) |
void * | gpio_grf_reg (gpio_t gpio) |
void | gpio_input_irq (gpio_t gpio, enum gpio_irq_type type, enum gpio_pull pull) |
int | gpio_irq_status (gpio_t gpio) |
u32 | gpio_get_pull_val (gpio_t gpio, enum gpio_pull pull) |
Variables | |
struct rockchip_gpio_regs * | gpio_port [] |
enum gpio_irq_type |
enum gpio_pull |
check_member | ( | rockchip_gpio_regs | , |
ls_sync | , | ||
0x60 | |||
) |
Definition at line 39 of file gpio.c.
References GPIO_PULLDOWN, GPIO_PULLNONE, GPIO_PULLUP, IS_GPIO_BANK, pull, PULLDOWN_1V8, PULLNONE_1V8, and PULLUP_1V8.
Referenced by gpio_set_pull().
Definition at line 31 of file gpio.c.
References rk3399_pmugrf_regs::gpio0_p, rk3288_pmu_regs::gpio0pull, rk3288_grf_regs::gpio1_p, rk3399_grf_regs::gpio2_p, is_pmu_gpio(), rk3288_grf, rk3288_pmu, rk3399_grf, and rk3399_pmugrf.
Referenced by gpio_set_pull().
void gpio_input_irq | ( | gpio_t | gpio, |
enum gpio_irq_type | type, | ||
enum gpio_pull | pull | ||
) |
Definition at line 46 of file gpio.c.
References assert, BIT, clrbits32, clrsetbits32, GPIO_INPUT, gpio_port, GPIO_PULLDOWN, gpio_set_dir(), gpio_set_pull(), rockchip_gpio_regs::int_polarity, rockchip_gpio_regs::inten, rockchip_gpio_regs::intmask, rockchip_gpio_regs::inttype_level, IRQ_TYPE_EDGE_FALLING, IRQ_TYPE_EDGE_RISING, IRQ_TYPE_LEVEL_HIGH, IRQ_TYPE_LEVEL_LOW, mask, pull, setbits32, and type.
int gpio_irq_status | ( | gpio_t | gpio | ) |
Definition at line 79 of file gpio.c.
References BIT, GPIO_INTR_STATUS_DISABLE, GPIO_INTR_STATUS_ENABLE, GPIO_INTR_STATUS_MASK, gpio_port, rockchip_gpio_regs::int_status, mask, rockchip_gpio_regs::porta_eoi, read32(), setbits32, and write32().
int is_pmu_gpio | ( | gpio_t | gpio | ) |
Definition at line 24 of file gpio.c.
References PMU_GPIO_PORT, PMU_GPIO_PORT0, and PMU_GPIO_PORT1.
Referenced by gpio_grf_reg(), and gpio_set_pull().
|
extern |
Definition at line 10 of file gpio.c.
Referenced by gpio_get(), gpio_input_irq(), gpio_irq_status(), gpio_set(), and gpio_set_dir().