coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
lpe.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 <reg_script.h>
#include <soc/iomap.h>
#include <soc/iosf.h>
#include <soc/lpc.h>
#include <soc/device_nvs.h>
#include <soc/pattrs.h>
#include <soc/pci_devs.h>
#include <soc/pm.h>
#include <soc/ramstage.h>
#include "chip.h"
Include dependency graph for lpe.c:

Go to the source code of this file.

Macros

#define FIRMWARE_PHYS_BASE   (512 << 20)
 
#define FIRMWARE_PHYS_LENGTH   (1 << 20)
 
#define FIRMWARE_PCI_REG_BASE   0xa8
 
#define FIRMWARE_PCI_REG_LENGTH   0xac
 
#define FIRMWARE_REG_BASE_C0   0x144000
 
#define FIRMWARE_REG_LENGTH_C0   (FIRMWARE_REG_BASE_C0 + 4)
 

Functions

static void assign_device_nvs (struct device *dev, u32 *field, unsigned int index)
 
static void lpe_enable_acpi_mode (struct device *dev)
 
static void setup_codec_clock (struct device *dev)
 
static void lpe_stash_firmware_info (struct device *dev)
 
static void lpe_init (struct device *dev)
 
static void lpe_read_resources (struct device *dev)
 

Variables

static const struct device_operations device_ops
 
static const struct pci_driver southcluster __pci_driver
 

Macro Definition Documentation

◆ FIRMWARE_PCI_REG_BASE

#define FIRMWARE_PCI_REG_BASE   0xa8

Definition at line 28 of file lpe.c.

◆ FIRMWARE_PCI_REG_LENGTH

#define FIRMWARE_PCI_REG_LENGTH   0xac

Definition at line 29 of file lpe.c.

◆ FIRMWARE_PHYS_BASE

#define FIRMWARE_PHYS_BASE   (512 << 20)

Definition at line 26 of file lpe.c.

◆ FIRMWARE_PHYS_LENGTH

#define FIRMWARE_PHYS_LENGTH   (1 << 20)

Definition at line 27 of file lpe.c.

◆ FIRMWARE_REG_BASE_C0

#define FIRMWARE_REG_BASE_C0   0x144000

Definition at line 30 of file lpe.c.

◆ FIRMWARE_REG_LENGTH_C0

#define FIRMWARE_REG_LENGTH_C0   (FIRMWARE_REG_BASE_C0 + 4)

Definition at line 31 of file lpe.c.

Function Documentation

◆ assign_device_nvs()

static void assign_device_nvs ( struct device dev,
u32 field,
unsigned int  index 
)
static

Definition at line 33 of file lpe.c.

References resource::base, resource::index, and probe_resource().

Referenced by lpe_enable_acpi_mode().

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

◆ lpe_enable_acpi_mode()

◆ lpe_init()

static void lpe_init ( struct device dev)
static

Definition at line 135 of file lpe.c.

References config, config_of(), lpe_enable_acpi_mode(), lpe_stash_firmware_info(), and setup_codec_clock().

Here is the call graph for this function:

◆ lpe_read_resources()

static void lpe_read_resources ( struct device dev)
static

Definition at line 146 of file lpe.c.

◆ lpe_stash_firmware_info()

static void lpe_stash_firmware_info ( struct device dev)
static

Definition at line 109 of file lpe.c.

References resource::base, BIOS_DEBUG, find_resource(), FIRMWARE_PCI_REG_BASE, FIRMWARE_PCI_REG_LENGTH, FIRMWARE_REG_BASE_C0, FIRMWARE_REG_LENGTH_C0, NULL, pattrs_get(), PCI_BASE_ADDRESS_0, pci_write_config32(), printk, probe_resource(), resource::size, STEP_C0, pattrs::stepping, and write32().

Referenced by lpe_init().

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

◆ setup_codec_clock()

static void setup_codec_clock ( struct device dev)
static

Definition at line 69 of file lpe.c.

References BIOS_DEBUG, CLK_CTL_ON, CLK_FREQ_19P2MHZ, CLK_FREQ_25MHZ, config, config_of(), PLT_CLK_CTL_0, PMC_BASE_ADDRESS, printk, read32(), and write32().

Referenced by lpe_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 southcluster __pci_driver
static
Initial value:
= {
.ops = &device_ops,
.vendor = PCI_VID_INTEL,
.device = LPE_DEVID,
}
static const struct device_operations device_ops
Definition: lpe.c:155
#define PCI_VID_INTEL
Definition: pci_ids.h:2157
#define LPE_DEVID
Definition: pci_devs.h:118

Definition at line 146 of file lpe.c.

◆ device_ops

const struct device_operations device_ops
static
Initial value:
= {
.read_resources = lpe_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = lpe_init,
.ops_pci = &soc_pci_ops,
}
static void lpe_read_resources(struct device *dev)
Definition: lpe.c:146
static void lpe_init(struct device *dev)
Definition: lpe.c:135
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
struct pci_operations soc_pci_ops
Definition: chip.c:51

Definition at line 146 of file lpe.c.