coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
lpc.c File Reference
#include <arch/hpet.h>
#include <arch/io.h>
#include <arch/ioapic.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <option.h>
#include <pc80/mc146818rtc.h>
#include <pc80/isa-dma.h>
#include <pc80/i8259.h>
#include "chip.h"
#include "i82801dx.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_i82801dx_config config_t
 

Functions

static void i82801dx_enable_acpi (struct device *dev)
 Enable ACPI I/O range. More...
 
static void i82801dx_enable_ioapic (struct device *dev)
 Set miscellaneous static southbridge features. More...
 
static void i82801dx_enable_serial_irqs (struct device *dev)
 
static void i82801dx_pirq_init (struct device *dev)
 
static void i82801dx_power_options (struct device *dev)
 
static void gpio_init (struct device *dev)
 
static void i82801dx_rtc_init (struct device *dev)
 
static void i82801dx_lpc_route_dma (struct device *dev, u8 mask)
 
static void i82801dx_lpc_decode_en (struct device *dev)
 
static void enable_hpet (struct device *dev)
 
static void lpc_init (struct device *dev)
 
static void i82801dx_lpc_read_resources (struct device *dev)
 

Variables

static struct device_operations lpc_ops
 
static const struct pci_driver lpc_driver_db __pci_driver
 

Macro Definition Documentation

◆ NMI_OFF

#define NMI_OFF   0

Definition at line 18 of file lpc.c.

Typedef Documentation

◆ config_t

Definition at line 1 of file lpc.c.

Function Documentation

◆ enable_hpet()

static void enable_hpet ( struct device dev)
static

Definition at line 212 of file lpc.c.

References BIOS_DEBUG, BIOS_INFO, BIOS_WARNING, GEN_CNTL, HPET_BASE_ADDRESS, pci_read_config32(), pci_write_config32(), printk, and val.

Referenced by lpc_init().

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

◆ gpio_init()

static void gpio_init ( struct device dev)
static

Definition at line 156 of file lpc.c.

References GPIO_BASE, GPIO_CNTL, GPIOBASE_ADDR, pci_write_config32(), and pci_write_config8().

Referenced by lpc_init().

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

◆ i82801dx_enable_acpi()

static void i82801dx_enable_acpi ( struct device dev)
static

Enable ACPI I/O range.

Parameters
devPCI device with ACPI and PM BAR's

Definition at line 27 of file lpc.c.

References ACPI_CNTL, ACPI_EN, pci_write_config32(), pci_write_config8(), PMBASE, and PMBASE_ADDR.

Referenced by lpc_init().

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

◆ i82801dx_enable_ioapic()

static void i82801dx_enable_ioapic ( struct device dev)
static

Set miscellaneous static southbridge features.

Parameters
devPCI device with I/O APIC control registers

Definition at line 41 of file lpc.c.

References BIOS_DEBUG, GEN_CNTL, ioapic_set_boot_config(), pci_read_config32(), pci_write_config32(), printk, 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:

◆ i82801dx_enable_serial_irqs()

static void i82801dx_enable_serial_irqs ( struct device dev)
static

Definition at line 58 of file lpc.c.

References pci_write_config8(), and SERIRQ_CNTL.

Referenced by lpc_init().

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

◆ i82801dx_lpc_decode_en()

static void i82801dx_lpc_decode_en ( struct device dev)
static

Definition at line 198 of file lpc.c.

References COM_DEC, LPC_EN, pci_write_config16(), and pci_write_config8().

Referenced by lpc_init().

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

◆ i82801dx_lpc_read_resources()

static void i82801dx_lpc_read_resources ( struct device dev)
static

Definition at line 287 of file lpc.c.

◆ i82801dx_lpc_route_dma()

static void i82801dx_lpc_route_dma ( struct device dev,
u8  mask 
)
static

Definition at line 183 of file lpc.c.

References mask, PCI_DMA_CFG, pci_read_config16(), and pci_write_config16().

Referenced by lpc_init().

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

◆ i82801dx_pirq_init()

static void i82801dx_pirq_init ( struct device dev)
static

Definition at line 67 of file lpc.c.

References device::chip_info, config, pci_write_config8(), PIRQA_ROUT, PIRQB_ROUT, PIRQC_ROUT, PIRQD_ROUT, PIRQE_ROUT, PIRQF_ROUT, PIRQG_ROUT, and PIRQH_ROUT.

Referenced by lpc_init().

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

◆ i82801dx_power_options()

static void i82801dx_power_options ( struct device dev)
static

Definition at line 82 of file lpc.c.

References BIOS_INFO, GEN_PMCON_1, GEN_PMCON_3, get_uint_option(), inb(), inl(), MAINBOARD_POWER_KEEP, MAINBOARD_POWER_OFF, MAINBOARD_POWER_ON, NMI_OFF, outb(), outl(), pci_read_config16(), pci_read_config8(), pci_write_config16(), pci_write_config8(), pmbase, and printk.

Referenced by lpc_init().

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

◆ i82801dx_rtc_init()

static void i82801dx_rtc_init ( struct device dev)
static

Definition at line 163 of file lpc.c.

References cmos_init(), GEN_PMCON_3, GEN_STS, pci_read_config32(), pci_read_config8(), pci_write_config8(), RTC_BATTERY_DEAD, RTC_CONF, and rtc_failed().

Referenced by lpc_init().

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

◆ lpc_init()

Variable Documentation

◆ __pci_driver

static const struct pci_driver lpc_driver_dbm __pci_driver
static
Initial value:
= {
.ops = &lpc_ops,
.vendor = PCI_VID_INTEL,
}
#define PCI_DID_INTEL_82801DB_LPC
Definition: pci_ids.h:2275
#define PCI_VID_INTEL
Definition: pci_ids.h:2157
static struct device_operations lpc_ops
Definition: lpc.c:313

Definition at line 287 of file lpc.c.

◆ lpc_ops

struct device_operations lpc_ops
static
Initial value:
= {
.read_resources = i82801dx_lpc_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = lpc_init,
.scan_bus = scan_static_bus,
.enable = i82801dx_enable,
}
void i82801dx_enable(struct device *dev)
Definition: i82801dx.c:8
void pci_dev_enable_resources(struct device *dev)
Definition: pci_device.c:721
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 void lpc_init(struct device *dev)
Definition: lpc.c:246
static void i82801dx_lpc_read_resources(struct device *dev)
Definition: lpc.c:287

Definition at line 287 of file lpc.c.