![]() |
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 "gpio.h"
Go to the source code of this file.
Macros | |
#define | MAX_GPIO_NUMBER 75 /* zero based */ |
#define | GPIO_BASE 0x48 |
Functions | |
static u16 | get_gpio_base (void) |
void | setup_pch_gpios (const struct pch_gpio_map *gpio) |
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 88 of file gpio.c.
References get_gpio_base(), GP_LVL, GP_LVL2, GP_LVL3, inl(), and MAX_GPIO_NUMBER.
Referenced by get_gpios().
Definition at line 16 of file gpio.c.
References GPIO_BASE, PCI_DEV, pci_read_config16(), and pcidev_on_root().
Referenced by get_gpio(), gpio_is_native(), set_gpio(), and setup_pch_gpios().
unsigned int get_gpios | ( | const int * | gpio_num_array | ) |
Definition at line 107 of file gpio.c.
References get_gpio().
Referenced by dock_present(), locate_spd(), mainboard_get_spd(), and variant_get_spd_index().
int gpio_is_native | ( | int | gpio_num | ) |
Definition at line 147 of file gpio.c.
References config, get_gpio_base(), GPIO_USE_SEL, GPIO_USE_SEL2, GPIO_USE_SEL3, inl(), and MAX_GPIO_NUMBER.
Referenced by pch_enable_mphy(), and pcie_enable_clock_gating().
void set_gpio | ( | int | gpio_num, |
int | value | ||
) |
Definition at line 125 of file gpio.c.
References config, get_gpio_base(), GP_LVL, GP_LVL2, GP_LVL3, inl(), MAX_GPIO_NUMBER, outl(), and value.
Referenced by dock_connect(), dock_disconnect(), early_hybrid_graphics(), mainboard_disable_gpios(), mainboard_post_raminit(), mainboard_smi_sleep(), and mb_post_raminit_setup().
void setup_pch_gpios | ( | const struct pch_gpio_map * | gpio | ) |
Definition at line 33 of file gpio.c.
References get_gpio_base(), GP_IO_SEL, GP_IO_SEL2, GP_IO_SEL3, GP_LVL, GP_LVL2, GP_LVL3, GP_RST_SEL1, GP_RST_SEL2, GP_RST_SEL3, GPI_INV, GPIO_USE_SEL, GPIO_USE_SEL2, GPIO_USE_SEL3, GPO_BLINK, and outl().
Referenced by bootblock_mainboard_early_init(), early_gpio_init(), early_pch_init(), i82801jx_early_init(), and mainboard_romstage_entry().