coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
serialio.c File Reference
#include <device/mmio.h>
#include <device/pci_ops.h>
#include <acpi/acpi_gnvs.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <soc/device_nvs.h>
#include <soc/pci_devs.h>
#include <soc/pch.h>
#include <soc/rcba.h>
#include <soc/serialio.h>
#include <soc/intel/broadwell/pch/chip.h>
#include <southbridge/intel/lynxpoint/iobp.h>
#include <types.h>
Include dependency graph for serialio.c:

Go to the source code of this file.

Functions

static void serialio_enable_d3hot (struct resource *res)
 
static bool serialio_uart_is_debug (struct device *dev)
 
static void serialio_enable_clock (struct resource *bar0)
 
static void serialio_d21_mode (int sio_index, int int_pin, int acpi_mode)
 
static void serialio_d23_mode (int acpi_mode)
 
static void serialio_d21_ltr (struct resource *bar0)
 
static void serialio_d23_ltr (struct resource *bar0)
 
static void serialio_i2c_voltage_sel (struct resource *bar0, u8 voltage)
 
static void serialio_init_once (int acpi_mode)
 
static void serialio_init (struct device *dev)
 
static void serialio_read_resources (struct device *dev)
 

Variables

static struct device_operations device_ops
 
static const unsigned short pci_device_ids []
 
static const struct pci_driver pch_pcie __pci_driver
 

Function Documentation

◆ serialio_d21_ltr()

static void serialio_d21_ltr ( struct resource bar0)
static

Definition at line 91 of file serialio.c.

References read32(), res2mmio(), SIO_REG_AUTO_LTR, SIO_REG_PPR_GEN, SIO_REG_PPR_GEN_LTR_MODE_MASK, SIO_REG_PPR_RST, SIO_REG_PPR_RST_ASSERT, and write32().

Referenced by serialio_init().

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

◆ serialio_d21_mode()

static void serialio_d21_mode ( int  sio_index,
int  int_pin,
int  acpi_mode 
)
static

Definition at line 49 of file serialio.c.

References pch_iobp_update(), SIO_IOBP_PORTCTRL_ACPI_IRQ_EN, SIO_IOBP_PORTCTRL_INT_PIN, SIO_IOBP_PORTCTRL_PCI_CONF_DIS, SIO_IOBP_PORTCTRL_PM_CAP_PRSNT, SIO_IOBP_PORTCTRL_SNOOP_SELECT, and SIO_IOBP_PORTCTRLX.

Referenced by serialio_init().

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

◆ serialio_d23_ltr()

static void serialio_d23_ltr ( struct resource bar0)
static

Definition at line 115 of file serialio.c.

References read32(), res2mmio(), SIO_REG_PPR_GEN_LTR_MODE_MASK, SIO_REG_SDIO_PPR_CMD12, SIO_REG_SDIO_PPR_CMD12_B30, SIO_REG_SDIO_PPR_GEN, SIO_REG_SDIO_PPR_SW_LTR, and write32().

Referenced by serialio_init().

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

◆ serialio_d23_mode()

static void serialio_d23_mode ( int  acpi_mode)
static

Definition at line 71 of file serialio.c.

References pch_iobp_update(), SIO_IOBP_PORTCTRL0, SIO_IOBP_PORTCTRL0_ACPI_IRQ_EN, SIO_IOBP_PORTCTRL0_PCI_CONF_DIS, SIO_IOBP_PORTCTRL1, and SIO_IOBP_PORTCTRL1_SNOOP_SELECT.

Referenced by serialio_init().

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

◆ serialio_enable_clock()

static void serialio_enable_clock ( struct resource bar0)
static

Definition at line 41 of file serialio.c.

References read32(), res2mmio(), SIO_REG_PPR_CLOCK, SIO_REG_PPR_CLOCK_EN, and write32().

Referenced by serialio_init().

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

◆ serialio_enable_d3hot()

static void serialio_enable_d3hot ( struct resource res)
static

Definition at line 20 of file serialio.c.

References PCH_PCS, PCH_PCS_PS_D3HOT, read32(), res2mmio(), and write32().

Referenced by serialio_init().

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

◆ serialio_i2c_voltage_sel()

static void serialio_i2c_voltage_sel ( struct resource bar0,
u8  voltage 
)
static

Definition at line 134 of file serialio.c.

References read32(), res2mmio(), SIO_REG_PPR_GEN, SIO_REG_PPR_GEN_VOLTAGE, SIO_REG_PPR_GEN_VOLTAGE_MASK, voltage, and write32().

Referenced by serialio_init().

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

◆ serialio_init()

◆ serialio_init_once()

static void serialio_init_once ( int  acpi_mode)
static

Definition at line 143 of file serialio.c.

References ACPIIRQEN, pch_iobp_update(), RCBA32_OR, and SIO_IOBP_GPIODF.

Referenced by serialio_init().

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

◆ serialio_read_resources()

static void serialio_read_resources ( struct device dev)
static

Definition at line 253 of file serialio.c.

◆ serialio_uart_is_debug()

static bool serialio_uart_is_debug ( struct device dev)
static

Definition at line 27 of file serialio.c.

References CONFIG, pci_path::devfn, device::path, PCH_DEVFN_UART0, PCH_DEVFN_UART1, and device_path::pci.

Referenced by serialio_init().

Here is the caller graph for this function:

Variable Documentation

◆ __pci_driver

const struct pci_driver pch_pcie __pci_driver
static
Initial value:
= {
.ops = &device_ops,
.vendor = PCI_VID_INTEL,
.devices = pci_device_ids,
}
#define PCI_VID_INTEL
Definition: pci_ids.h:2157
static struct device_operations device_ops
Definition: serialio.c:266
static const unsigned short pci_device_ids[]
Definition: serialio.c:274

Definition at line 274 of file serialio.c.

◆ device_ops

struct device_operations device_ops
static
Initial value:
= {
.read_resources = &serialio_read_resources,
.set_resources = &pci_dev_set_resources,
.enable_resources = &pci_dev_enable_resources,
.init = &serialio_init,
.ops_pci = &pci_dev_ops_pci,
}
void pci_dev_enable_resources(struct device *dev)
Definition: pci_device.c:721
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
Definition: pci_device.c:911
void pci_dev_set_resources(struct device *dev)
Definition: pci_device.c:691
static void serialio_init(struct device *dev)
Definition: serialio.c:157
static void serialio_read_resources(struct device *dev)
Definition: serialio.c:253

Definition at line 253 of file serialio.c.

◆ pci_device_ids

const unsigned short pci_device_ids[]
static
Initial value:
= {
0x9c60, 0x9ce0,
0x9c61, 0x9ce1,
0x9c62, 0x9ce2,
0x9c65, 0x9ce5,
0x9c66, 0x9ce6,
0x9c63, 0x9ce3,
0x9c64, 0x9ce4,
0x9c35, 0x9cb5,
0
}

Definition at line 274 of file serialio.c.