coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
lpc.c File Reference
#include <arch/ioapic.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pnp.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <device/pci_def.h>
#include <pc80/mc146818rtc.h>
#include <pc80/isa-dma.h>
#include <pc80/i8254.h>
#include <pc80/i8259.h>
#include <amdblocks/acpi.h>
#include <amdblocks/acpimmio.h>
#include <amdblocks/espi.h>
#include <amdblocks/ioapic.h>
#include <amdblocks/lpc.h>
#include <soc/iomap.h>
#include <soc/lpc.h>
#include <soc/southbridge.h>
Include dependency graph for lpc.c:

Go to the source code of this file.

Functions

static void setup_serirq (void)
 
static void fch_ioapic_init (void)
 
static void lpc_init (struct device *dev)
 
static void lpc_read_resources (struct device *dev)
 
static void lpc_set_resources (struct device *dev)
 
static void configure_child_lpc_windows (struct device *dev, struct device *child)
 
static void configure_child_espi_windows (struct device *child)
 
static void lpc_enable_children_resources (struct device *dev)
 
static void lpc_enable_resources (struct device *dev)
 

Variables

static struct device_operations lpc_ops
 
static const unsigned short pci_device_ids []
 
static const struct pci_driver lpc_driver __pci_driver
 

Function Documentation

◆ configure_child_espi_windows()

static void configure_child_espi_windows ( struct device child)
static

Definition at line 278 of file lpc.c.

References resource::base, espi_open_io_window(), espi_open_mmio_window(), resource::flags, IORESOURCE_IO, IORESOURCE_MEM, resource::next, device::resource_list, and resource::size.

Referenced by lpc_enable_children_resources().

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

◆ configure_child_lpc_windows()

◆ fch_ioapic_init()

static void fch_ioapic_init ( void  )
static

Definition at line 39 of file lpc.c.

References fch_enable_ioapic_decode(), FCH_IOAPIC_ID, setup_ioapic(), and VIO_APIC_VADDR.

Referenced by lpc_init().

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

◆ lpc_enable_children_resources()

static void lpc_enable_children_resources ( struct device dev)
static

Definition at line 290 of file lpc.c.

References bus::children, CONFIG, configure_child_espi_windows(), configure_child_lpc_windows(), DEVICE_PATH_PNP, device::enabled, device::link_list, bus::next, device::path, device::sibling, and device_path::type.

Referenced by lpc_enable_resources().

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

◆ lpc_enable_resources()

static void lpc_enable_resources ( struct device dev)
static

Definition at line 309 of file lpc.c.

References lpc_enable_children_resources(), and pci_dev_enable_resources().

Here is the call graph for this function:

◆ lpc_init()

◆ lpc_read_resources()

◆ lpc_set_resources()

static void lpc_set_resources ( struct device dev)
static

Definition at line 131 of file lpc.c.

References resource::base, find_resource(), pci_dev_set_resources(), pci_read_config32(), pci_write_config32(), SPI_BASE_ADDRESS_REGISTER, and SPI_BASE_ALIGNMENT.

Here is the call graph for this function:

◆ setup_serirq()

static void setup_serirq ( void  )
static

Definition at line 25 of file lpc.c.

References CONFIG, PM_SERIRQ_CONF, PM_SERIRQ_ENABLE, PM_SERIRQ_MODE, PM_SERIRQ_NUM_BITS_21, and pm_write8().

Referenced by lpc_init().

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

Variable Documentation

◆ __pci_driver

const struct pci_driver lpc_driver __pci_driver
static
Initial value:
= {
.ops = &lpc_ops,
.vendor = PCI_VID_AMD,
.devices = pci_device_ids,
}
#define PCI_VID_AMD
Definition: pci_ids.h:496
static struct device_operations lpc_ops
Definition: lpc.c:322
static const unsigned short pci_device_ids[]
Definition: lpc.c:335

Definition at line 335 of file lpc.c.

◆ lpc_ops

struct device_operations lpc_ops
static
Initial value:
= {
.read_resources = lpc_read_resources,
.set_resources = lpc_set_resources,
.enable_resources = lpc_enable_resources,
.init = lpc_init,
.scan_bus = scan_static_bus,
.ops_pci = &pci_dev_ops_pci,
}
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
Definition: pci_device.c:911
void scan_static_bus(struct device *bus)
Definition: root_device.c:89
static void lpc_read_resources(struct device *dev)
Definition: lpc.c:99
static void lpc_enable_resources(struct device *dev)
Definition: lpc.c:309
static void lpc_set_resources(struct device *dev)
Definition: lpc.c:131
static void lpc_init(struct device *dev)
Definition: lpc.c:45

Definition at line 309 of file lpc.c.

◆ pci_device_ids

const unsigned short pci_device_ids[]
static
Initial value:
= {
0
}
#define PCI_DID_AMD_SB900_LPC
Definition: pci_ids.h:517
#define PCI_DID_AMD_CZ_LPC
Definition: pci_ids.h:578

Definition at line 335 of file lpc.c.