![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <stdint.h>
#include <arch/io.h>
#include <device/pci_ops.h>
#include <device/device.h>
#include <device/pci.h>
#include "pch.h"
#include "lp_gpio.h"
Go to the source code of this file.
Functions | |
static u16 | get_gpio_base (void) |
static int | lp_gpio_to_pirq (int gpio) |
void | setup_pch_lp_gpios (const struct pch_lp_gpio_map map[]) |
int | get_gpio (int gpio_num) |
unsigned int | get_gpios (const int *gpio_num_array) |
void | set_gpio (int gpio_num, int value) |
int | gpio_is_native (int gpio_num) |
int get_gpio | ( | int | gpio_num | ) |
Definition at line 102 of file lp_gpio.c.
References get_gpio_base(), GPI_LEVEL, GPIO_CONFIG0, inl(), and MAX_GPIO_NUMBER.
Referenced by get_gpios().
Definition at line 12 of file lp_gpio.c.
References GPIO_BASE, PCH_LPC_DEV, pci_read_config16(), and pcidev_on_root().
Referenced by get_gpio(), gpio_is_native(), set_gpio(), and setup_pch_lp_gpios().
unsigned int get_gpios | ( | const int * | gpio_num_array | ) |
Definition at line 116 of file lp_gpio.c.
References get_gpio(), and pch_lp_gpio_map::gpio.
int gpio_is_native | ( | int | gpio_num | ) |
Definition at line 145 of file lp_gpio.c.
References get_gpio_base(), GPIO_CONFIG0, and inl().
|
static |
Definition at line 27 of file lp_gpio.c.
Referenced by setup_pch_lp_gpios().
void set_gpio | ( | int | gpio_num, |
int | value | ||
) |
Definition at line 131 of file lp_gpio.c.
References pch_lp_gpio_map::conf0, get_gpio_base(), GPIO_CONFIG0, GPO_LEVEL_MASK, GPO_LEVEL_SHIFT, inl(), MAX_GPIO_NUMBER, outl(), and value.
void setup_pch_lp_gpios | ( | const struct pch_lp_gpio_map | map[] | ) |
Definition at line 50 of file lp_gpio.c.
References pch_lp_gpio_map::blink, config, get_gpio_base(), GPIO_BLINK, GPIO_CONFIG0, GPIO_CONFIG1, GPIO_IRQ_IE, GPIO_LIST_END, GPIO_OWNER, GPIO_PIRQ_APIC_EN, GPIO_PIRQ_APIC_ROUTE, GPIO_RESET, GPIO_ROUTE, pch_lp_gpio_map::irqen, lp_gpio_to_pirq(), MAX_GPIO_NUMBER, outl(), pch_lp_gpio_map::owner, reset(), and pch_lp_gpio_map::route.
Referenced by early_pch_init(), and mainboard_romstage_entry().