coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
lpss.c File Reference
#include <stdint.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/iosf.h>
#include <soc/nvs.h>
#include <soc/device_nvs.h>
#include <soc/pci_devs.h>
#include <soc/ramstage.h>
#include "chip.h"
Include dependency graph for lpss.c:

Go to the source code of this file.

Macros

#define SET_IOSF_REG(name_)
 
#define CASE_I2C(name_)   case PCI_DEVFN(name_ ## _DEV, name_ ## _FUNC)
 

Functions

static void dev_enable_acpi_mode (struct device *dev, int iosf_reg, int nvs_index)
 
static void dev_enable_snoop_and_pm (struct device *dev, int iosf_reg)
 
static void dev_ctl_reg (struct device *dev, int *iosf_reg, int *nvs_index)
 
static void i2c_disable_resets (struct device *dev)
 
static void lpss_init (struct device *dev)
 

Variables

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

Macro Definition Documentation

◆ CASE_I2C

#define CASE_I2C (   name_)    case PCI_DEVFN(name_ ## _DEV, name_ ## _FUNC)

Definition at line 106 of file lpss.c.

◆ SET_IOSF_REG

#define SET_IOSF_REG (   name_)
Value:
case PCI_DEVFN(name_ ## _DEV, name_ ## _FUNC): \
do { \
*iosf_reg = LPSS_ ## name_ ## _CTL; \
*nvs_index = LPSS_NVS_ ## name_; \
} while (0)
#define PCI_DEVFN(slot, func)
Definition: pci_def.h:548

Definition at line 62 of file lpss.c.

Function Documentation

◆ dev_ctl_reg()

static void dev_ctl_reg ( struct device dev,
int *  iosf_reg,
int *  nvs_index 
)
static

◆ dev_enable_acpi_mode()

◆ dev_enable_snoop_and_pm()

static void dev_enable_snoop_and_pm ( struct device dev,
int  iosf_reg 
)
static

Definition at line 50 of file lpss.c.

References reg_script::dev, IOSF_PORT_LPSS, LPSS_CTL_NOSNOOP, LPSS_CTL_PM_CAP_PRSNT, LPSS_CTL_SNOOP, ops, REG_SCRIPT_END, and reg_script_run_on_dev().

Here is the call graph for this function:

◆ i2c_disable_resets()

static void i2c_disable_resets ( struct device dev)
static

◆ lpss_init()

static void lpss_init ( struct device dev)
static

Definition at line 132 of file lpss.c.

Variable Documentation

◆ __pci_driver

const struct pci_driver southcluster __pci_driver
static
Initial value:
= {
.ops = &device_ops,
.vendor = PCI_VID_INTEL,
.devices = pci_device_ids,
}
static struct device_operations device_ops
Definition: lpss.c:152
static const unsigned short pci_device_ids[]
Definition: lpss.c:160
#define PCI_VID_INTEL
Definition: pci_ids.h:2157

Definition at line 160 of file lpss.c.

◆ device_ops

struct device_operations device_ops
static
Initial value:
= {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = lpss_init,
.ops_pci = &soc_pci_ops,
}
static void lpss_init(struct device *dev)
Definition: lpss.c:132
void pci_dev_enable_resources(struct device *dev)
Definition: pci_device.c:721
void pci_dev_read_resources(struct device *dev)
Definition: pci_device.c:534
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 132 of file lpss.c.

◆ pci_device_ids

const unsigned short pci_device_ids[]
static
Initial value:
= {
0,
}
#define PWM2_DEVID
Definition: pci_devs.h:137
#define PWM1_DEVID
Definition: pci_devs.h:136
#define I2C1_DEVID
Definition: pci_devs.h:121
#define I2C7_DEVID
Definition: pci_devs.h:127
#define HSUART2_DEVID
Definition: pci_devs.h:139
#define SIO_DMA2_DEVID
Definition: pci_devs.h:135
#define SIO_DMA1_DEVID
Definition: pci_devs.h:120
#define I2C4_DEVID
Definition: pci_devs.h:124
#define HSUART1_DEVID
Definition: pci_devs.h:138
#define I2C6_DEVID
Definition: pci_devs.h:126
#define SPI_DEVID
Definition: pci_devs.h:140
#define I2C5_DEVID
Definition: pci_devs.h:125
#define I2C3_DEVID
Definition: pci_devs.h:123
#define I2C2_DEVID
Definition: pci_devs.h:122

Definition at line 160 of file lpss.c.