coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
lpc.c File Reference
#include <amdblocks/acpimmio.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 <arch/io.h>
#include <arch/ioapic.h>
#include <acpi/acpi.h>
#include <pc80/i8254.h>
#include <pc80/i8259.h>
#include "hudson.h"
#include "pci_devs.h"
Include dependency graph for lpc.c:

Go to the source code of this file.

Functions

static void lpc_init (struct device *dev)
 
static void hudson_lpc_read_resources (struct device *dev)
 
static void hudson_lpc_set_resources (struct device *dev)
 
static void hudson_lpc_enable_childrens_resources (struct device *dev)
 Enable resources for children devices. More...
 
static void hudson_lpc_enable_resources (struct device *dev)
 
static const char * lpc_acpi_name (const struct device *dev)
 
static void lpc_final (struct device *dev)
 

Variables

static struct device_operations lpc_ops
 
static const struct pci_driver lpc_driver __pci_driver
 

Function Documentation

◆ hudson_lpc_enable_childrens_resources()

static void hudson_lpc_enable_childrens_resources ( struct device dev)
static

Enable resources for children devices.

Parameters
devthe device whose children's resources are to be enabled

Definition at line 125 of file lpc.c.

References __fallthrough, resource::base, base, BIOS_DEBUG, BIOS_ERR, bus::children, bus::dev, dev_path(), DEVICE_PATH_PNP, device::enabled, resource::flags, IORESOURCE_IO, device::link_list, bus::next, resource::next, device::path, pci_read_config16(), pci_read_config32(), pci_read_config8(), pci_write_config16(), pci_write_config32(), pci_write_config8(), printk, resource_end(), device::resource_list, device::sibling, resource::size, and device_path::type.

Referenced by hudson_lpc_enable_resources().

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

◆ hudson_lpc_enable_resources()

static void hudson_lpc_enable_resources ( struct device dev)
static

Definition at line 304 of file lpc.c.

References hudson_lpc_enable_childrens_resources(), and pci_dev_enable_resources().

Here is the call graph for this function:

◆ hudson_lpc_read_resources()

◆ hudson_lpc_set_resources()

static void hudson_lpc_set_resources ( struct device dev)
static

Definition at line 108 of file lpc.c.

References resource::base, find_resource(), pci_dev_set_resources(), pci_write_config32(), SPI_ROM_ENABLE, and SPIROM_BASE_ADDRESS_REGISTER.

Here is the call graph for this function:

◆ lpc_acpi_name()

static const char* lpc_acpi_name ( const struct device dev)
static

◆ lpc_final()

static void lpc_final ( struct device dev)
static

Definition at line 321 of file lpc.c.

◆ lpc_init()

static void lpc_init ( struct device dev)
static

Variable Documentation

◆ __pci_driver

const struct pci_driver lpc_driver __pci_driver
static
Initial value:
= {
.ops = &lpc_ops,
.vendor = PCI_VID_AMD,
}
#define PCI_VID_AMD
Definition: pci_ids.h:496
#define PCI_DID_AMD_SB900_LPC
Definition: pci_ids.h:517
static struct device_operations lpc_ops
Definition: lpc.c:331

Definition at line 321 of file lpc.c.

◆ lpc_ops

struct device_operations lpc_ops
static
Initial value:
= {
.read_resources = hudson_lpc_read_resources,
.set_resources = hudson_lpc_set_resources,
.enable_resources = hudson_lpc_enable_resources,
.init = lpc_init,
.final = lpc_final,
.scan_bus = scan_static_bus,
.ops_pci = &pci_dev_ops_pci,
.acpi_name = lpc_acpi_name,
}
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_final(struct device *dev)
Definition: lpc.c:321
static const char * lpc_acpi_name(const struct device *dev)
Definition: lpc.c:310
static void hudson_lpc_set_resources(struct device *dev)
Definition: lpc.c:108
static void hudson_lpc_enable_resources(struct device *dev)
Definition: lpc.c:304
static void lpc_init(struct device *dev)
Definition: lpc.c:21
static void hudson_lpc_read_resources(struct device *dev)
Definition: lpc.c:77

Definition at line 321 of file lpc.c.