coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gpio_dnv.c File Reference
#include <stdint.h>
#include <string.h>
#include <device/mmio.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <soc/iomap.h>
#include <soc/pcr.h>
#include <soc/soc_util.h>
#include <soc/gpio_dnv.h>
Include dependency graph for gpio_dnv.c:

Go to the source code of this file.

Functions

static struct GPIO_GROUP_INFOGpioGetGroupInfoTable (uint32_t *GpioGroupInfoTableLength)
 
static void GpioGetPadOwnership (GPIO_PAD GpioPad, GPIO_PAD_OWN *PadOwnVal)
 
void gpio_configure_dnv_pads (const struct dnv_pad_config *gpio, size_t num)
 

Variables

static const struct GPIO_GROUP_INFO mGpioGroupInfo []
 

Function Documentation

◆ gpio_configure_dnv_pads()

void gpio_configure_dnv_pads ( const struct dnv_pad_config gpio,
size_t  num 
)

Definition at line 120 of file gpio_dnv.c.

References B_PCH_GPIO_PAD_MODE, B_PCH_GPIO_PADTOL, B_PCH_GPIO_RST_CONF, B_PCH_GPIO_RX_APIC_ROUTE, B_PCH_GPIO_RX_LVL_EDG, B_PCH_GPIO_RX_NMI_ROUTE, B_PCH_GPIO_RX_RAW1, B_PCH_GPIO_RX_SCI_ROUTE, B_PCH_GPIO_RX_SMI_ROUTE, B_PCH_GPIO_RXDIS, B_PCH_GPIO_RXINV, B_PCH_GPIO_TERM, B_PCH_GPIO_TX_STATE, B_PCH_GPIO_TXDIS, BIOS_DEBUG, BIOS_ERR, GPIO_CONFIG::Direction, GPIO_CONFIG::ElectricalConfig, GPIO_CONF_DIR_BIT_POS, GPIO_CONF_DIR_MASK, GPIO_CONF_INT_ROUTE_BIT_POS, GPIO_CONF_INT_ROUTE_MASK, GPIO_CONF_INT_TRIG_BIT_POS, GPIO_CONF_INT_TRIG_MASK, GPIO_CONF_INV_BIT_POS, GPIO_CONF_INV_MASK, GPIO_CONF_OUTPUT_BIT_POS, GPIO_CONF_OUTPUT_MASK, GPIO_CONF_PAD_MODE_BIT_POS, GPIO_CONF_PAD_MODE_MASK, GPIO_CONF_PADTOL_BIT_POS, GPIO_CONF_PADTOL_MASK, GPIO_CONF_RESET_BIT_POS, GPIO_CONF_RESET_MASK, GPIO_CONF_RXRAW_BIT_POS, GPIO_CONF_RXRAW_MASK, GPIO_CONF_TERM_BIT_POS, GPIO_CONF_TERM_MASK, GPIO_DNV_GROUP_MIN, GPIO_GET_GROUP_FROM_PAD, GPIO_GET_GROUP_INDEX_FROM_PAD, GPIO_GET_PAD_NUMBER, dnv_pad_config::GpioConfig, GpioGetGroupInfoTable(), GpioGetPadOwnership(), GpioHardwareDefault, GpioIntSci, dnv_pad_config::GpioPad, GpioPadModeGpio, GpioPadOwnCsme, GpioPadOwnHost, GpioPadOwnIsh, GPIO_CONFIG::HostSoftPadOwn, GPIO_CONFIG::InterruptConfig, memset(), mmio_andthenor32(), N_PCH_GPIO_PAD_MODE, N_PCH_GPIO_PADTOL, N_PCH_GPIO_RST_CONF, N_PCH_GPIO_RX_LVL_EDG, N_PCH_GPIO_RX_NMI_ROUTE, N_PCH_GPIO_RX_RAW1, N_PCH_GPIO_RXINV, N_PCH_GPIO_TERM, N_PCH_GPIO_TX_STATE, N_PCH_GPIO_TXDIS, NO_REGISTER_FOR_PROPERTY, NULL, GPIO_CONFIG::OtherSettings, GPIO_CONFIG::OutputState, GPIO_GROUP_INFO::PadCfgOffset, GPIO_CONFIG::PadMode, PCH_PCR_ADDRESS, GPIO_CONFIG::PowerConfig, printk, read32(), and V_PCH_GPIO_GROUP_MAX.

Referenced by mainboard_config_gpios().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GpioGetGroupInfoTable()

static struct GPIO_GROUP_INFO* GpioGetGroupInfoTable ( uint32_t GpioGroupInfoTableLength)
static

Definition at line 60 of file gpio_dnv.c.

References ARRAY_SIZE, and mGpioGroupInfo.

Referenced by gpio_configure_dnv_pads(), and GpioGetPadOwnership().

Here is the caller graph for this function:

◆ GpioGetPadOwnership()

static void GpioGetPadOwnership ( GPIO_PAD  GpioPad,
GPIO_PAD_OWN PadOwnVal 
)
static

Definition at line 67 of file gpio_dnv.c.

References BIOS_ERR, GPIO_GROUP_INFO::Community, GPIO_GET_GROUP_INDEX_FROM_PAD, GPIO_GET_PAD_NUMBER, GpioGetGroupInfoTable(), GPIO_GROUP_INFO::PadOwnOffset, GPIO_GROUP_INFO::PadPerGroup, PCH_PCR_ADDRESS, printk, and read32().

Referenced by gpio_configure_dnv_pads().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ mGpioGroupInfo

const struct GPIO_GROUP_INFO mGpioGroupInfo[]
static

Definition at line 1 of file gpio_dnv.c.

Referenced by GpioGetGroupInfoTable().