coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gpio.c File Reference
#include <gpio.h>
#include <soc/addressmap.h>
#include <soc/gpio.h>
#include <soc/grf.h>
#include <soc/soc.h>
Include dependency graph for gpio.c:

Go to the source code of this file.

Macros

#define PMU_GPIO_PORT0   0
 
#define PMU_GPIO_PORT1   1
 
#define IS_GPIO_BANK(g, p, b)   (g.port == p && g.bank == GPIO_##b)
 

Enumerations

enum  { PULLNONE_1V8 = 0 , PULLDOWN_1V8 = 1 , PULLUP_1V8 = 3 }
 

Functions

int is_pmu_gpio (gpio_t gpio)
 
voidgpio_grf_reg (gpio_t gpio)
 
u32 gpio_get_pull_val (gpio_t gpio, enum gpio_pull pull)
 

Variables

struct rockchip_gpio_regsgpio_port []
 

Macro Definition Documentation

◆ IS_GPIO_BANK

#define IS_GPIO_BANK (   g,
  p,
 
)    (g.port == p && g.bank == GPIO_##b)

Definition at line 35 of file gpio.c.

◆ PMU_GPIO_PORT0

#define PMU_GPIO_PORT0   0

Definition at line 17 of file gpio.c.

◆ PMU_GPIO_PORT1

#define PMU_GPIO_PORT1   1

Definition at line 18 of file gpio.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PULLNONE_1V8 
PULLDOWN_1V8 
PULLUP_1V8 

Definition at line 37 of file gpio.c.

Function Documentation

◆ gpio_get_pull_val()

u32 gpio_get_pull_val ( gpio_t  gpio,
enum gpio_pull  pull 
)

◆ gpio_grf_reg()

void* gpio_grf_reg ( gpio_t  gpio)

◆ is_pmu_gpio()

int is_pmu_gpio ( gpio_t  gpio)

Definition at line 20 of file gpio.c.

References PMU_GPIO_PORT, PMU_GPIO_PORT0, and PMU_GPIO_PORT1.

Variable Documentation

◆ gpio_port

struct rockchip_gpio_regs* gpio_port[]
Initial value:
= {
}
#define GPIO1_BASE
Definition: addressmap.h:54
#define GPIO0_BASE
Definition: addressmap.h:51
#define GPIO3_BASE
Definition: addressmap.h:56
#define GPIO2_BASE
Definition: addressmap.h:55
#define GPIO4_BASE
Definition: addressmap.h:57

Definition at line 9 of file gpio.c.