coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
lpc.c File Reference
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <option.h>
#include <pc80/mc146818rtc.h>
#include <pc80/isa-dma.h>
#include <pc80/i8259.h>
#include <arch/io.h>
#include <device/pci_ops.h>
#include <arch/ioapic.h>
#include <acpi/acpi.h>
#include <cpu/x86/smm.h>
#include <acpi/acpigen.h>
#include "chip.h"
#include "i82801ix.h"
#include <southbridge/intel/common/pciehp.h>
#include <southbridge/intel/common/pmutil.h>
#include <southbridge/intel/common/acpi_pirq_gen.h>
#include <southbridge/intel/common/rcba_pirq.h>
Include dependency graph for lpc.c:

Go to the source code of this file.

Macros

#define NMI_OFF   0
 

Typedefs

typedef struct southbridge_intel_i82801ix_config config_t
 

Functions

static void i82801ix_enable_apic (struct device *dev)
 
static void i82801ix_enable_serial_irqs (struct device *dev)
 
static void i82801ix_pirq_init (struct device *dev)
 
static void i82801ix_gpi_routing (struct device *dev)
 
static void i82801ix_power_options (struct device *dev)
 
static void i82801ix_configure_cstates (struct device *dev)
 
static void i82801ix_rtc_init (struct device *dev)
 
static void enable_hpet (void)
 
static void enable_clock_gating (void)
 
static void i82801ix_set_acpi_mode (struct device *dev)
 
static void lpc_init (struct device *dev)
 
static void i82801ix_lpc_read_resources (struct device *dev)
 
static const char * lpc_acpi_name (const struct device *dev)
 
static void southbridge_fill_ssdt (const struct device *device)
 

Variables

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

Macro Definition Documentation

◆ NMI_OFF

#define NMI_OFF   0

Definition at line 24 of file lpc.c.

Typedef Documentation

◆ config_t

Definition at line 1 of file lpc.c.

Function Documentation

◆ enable_clock_gating()

static void enable_clock_gating ( void  )
static

Definition at line 299 of file lpc.c.

References RCBA32, RCBA_CG, and RCBA_DMIC.

Referenced by lpc_init().

Here is the caller graph for this function:

◆ enable_hpet()

static void enable_hpet ( void  )
static

Definition at line 288 of file lpc.c.

References RCBA32, and RCBA_HPTC.

Referenced by lpc_init().

Here is the caller graph for this function:

◆ i82801ix_configure_cstates()

static void i82801ix_configure_cstates ( struct device dev)
static

Definition at line 259 of file lpc.c.

References D31F0_C4TIMING_CNT, D31F0_CxSTATE_CNF, pci_or_config8(), and pci_update_config8().

Referenced by lpc_init().

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

◆ i82801ix_enable_apic()

static void i82801ix_enable_apic ( struct device dev)
static

Definition at line 28 of file lpc.c.

References ioapic_lock_max_vectors(), RCBA8, 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:

◆ i82801ix_enable_serial_irqs()

static void i82801ix_enable_serial_irqs ( struct device dev)
static

Definition at line 41 of file lpc.c.

References D31F0_SERIRQ_CNTL, and pci_write_config8().

Referenced by lpc_init().

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

◆ i82801ix_gpi_routing()

static void i82801ix_gpi_routing ( struct device dev)
static

Definition at line 111 of file lpc.c.

References device::chip_info, config, D31F0_GPIO_ROUT, and pci_write_config32().

Referenced by i82801ix_power_options().

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

◆ i82801ix_lpc_read_resources()

static void i82801ix_lpc_read_resources ( struct device dev)
static

◆ i82801ix_pirq_init()

static void i82801ix_pirq_init ( struct device dev)
static

◆ i82801ix_power_options()

static void i82801ix_power_options ( struct device dev)
static

◆ i82801ix_rtc_init()

static void i82801ix_rtc_init ( struct device dev)
static

Definition at line 272 of file lpc.c.

References BIOS_DEBUG, cmos_init(), D31F0_GEN_PMCON_3, pci_read_config8(), pci_write_config8(), printk, RTC_BATTERY_DEAD, and rtc_failed().

Referenced by lpc_init().

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

◆ i82801ix_set_acpi_mode()

static void i82801ix_set_acpi_mode ( struct device dev)
static

Definition at line 330 of file lpc.c.

References acpi_is_wakeup_s3(), APM_CNT_ACPI_DISABLE, APM_CNT_ACPI_ENABLE, and apm_control().

Referenced by lpc_init().

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

◆ lpc_acpi_name()

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

Definition at line 441 of file lpc.c.

◆ lpc_init()

◆ southbridge_fill_ssdt()

static void southbridge_fill_ssdt ( const struct device device)
static

Definition at line 446 of file lpc.c.

Variable Documentation

◆ __pci_driver

const struct pci_driver ich9_lpc __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: lpc.c:455
static const unsigned short pci_device_ids[]
Definition: lpc.c:467

Definition at line 467 of file lpc.c.

◆ device_ops

struct device_operations device_ops
static
Initial value:
= {
.read_resources = i82801ix_lpc_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.write_acpi_tables = acpi_write_hpet,
.acpi_fill_ssdt = southbridge_fill_ssdt,
.acpi_name = lpc_acpi_name,
.init = lpc_init,
.scan_bus = scan_static_bus,
.ops_pci = &pci_dev_ops_pci,
}
unsigned long acpi_write_hpet(const struct device *device, unsigned long current, acpi_rsdp_t *rsdp)
Definition: acpi.c:1141
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
void scan_static_bus(struct device *bus)
Definition: root_device.c:89
static const char * lpc_acpi_name(const struct device *dev)
Definition: lpc.c:441
static void southbridge_fill_ssdt(const struct device *device)
Definition: lpc.c:446
static void i82801ix_lpc_read_resources(struct device *dev)
Definition: lpc.c:385
static void lpc_init(struct device *dev)
Definition: lpc.c:339

Definition at line 446 of file lpc.c.

◆ pci_device_ids

const unsigned short pci_device_ids[]
static
Initial value:
= {
0
}
#define PCI_DID_INTEL_82801IBM_LPC
Definition: pci_ids.h:2661
#define PCI_DID_INTEL_82801IEM_LPC
Definition: pci_ids.h:2660
#define PCI_DID_INTEL_82801IB_LPC
Definition: pci_ids.h:2627
#define PCI_DID_INTEL_82801IO_LPC
Definition: pci_ids.h:2658
#define PCI_DID_INTEL_82801IR_LPC
Definition: pci_ids.h:2659
#define PCI_DID_INTEL_82801IH_LPC
Definition: pci_ids.h:2657

Definition at line 467 of file lpc.c.