coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pcie.c File Reference
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_def.h>
#include <device/pci_ops.h>
#include <device/pci_ids.h>
#include "chip.h"
#include "i82801gx.h"
Include dependency graph for pcie.c:

Go to the source code of this file.

Data Structures

struct  root_port_config
 

Macros

#define NUM_ROOT_PORTS   6
 

Functions

static int root_port_is_first (struct device *dev)
 
static int root_port_is_last (struct device *dev)
 
static int root_port_number (struct device *dev)
 
static void pci_init (struct device *dev)
 
static int get_num_ports (void)
 
static void root_port_init_config (struct device *dev)
 
static void ich_pcie_device_set_func (int index, int pci_func)
 
static void root_port_commit_config (struct device *dev)
 
static void ich_pcie_enable (struct device *dev)
 

Variables

static struct root_port_config rpc
 
static struct device_operations device_ops
 
static const unsigned short i82801gx_pcie_ids []
 
static const struct pci_driver i82801gx_pcie __pci_driver
 

Macro Definition Documentation

◆ NUM_ROOT_PORTS

#define NUM_ROOT_PORTS   6

Definition at line 13 of file pcie.c.

Function Documentation

◆ get_num_ports()

static int get_num_ports ( void  )
static

Definition at line 82 of file pcie.c.

References FDVCT, pci_read_config32(), pcidev_on_root(), and PCIE_4_PORTS_MAX.

Referenced by root_port_init_config().

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

◆ ich_pcie_device_set_func()

static void ich_pcie_device_set_func ( int  index,
int  pci_func 
)
static

◆ ich_pcie_enable()

static void ich_pcie_enable ( struct device dev)
static

Definition at line 196 of file pcie.c.

◆ pci_init()

◆ root_port_commit_config()

static void root_port_commit_config ( struct device dev)
static

◆ root_port_init_config()

static void root_port_init_config ( struct device dev)
static

◆ root_port_is_first()

static int root_port_is_first ( struct device dev)
inlinestatic

Definition at line 25 of file pcie.c.

References pci_path::devfn, device::path, device_path::pci, and PCI_FUNC.

Referenced by root_port_init_config().

Here is the caller graph for this function:

◆ root_port_is_last()

static int root_port_is_last ( struct device dev)
inlinestatic

◆ root_port_number()

static int root_port_number ( struct device dev)
inlinestatic

Definition at line 36 of file pcie.c.

References pci_path::devfn, device::path, device_path::pci, and PCI_FUNC.

Referenced by root_port_init_config().

Here is the caller graph for this function:

Variable Documentation

◆ __pci_driver

const struct pci_driver i82801gx_pcie __pci_driver
static
Initial value:
= {
.ops = &device_ops,
.vendor = PCI_VID_INTEL,
.devices = i82801gx_pcie_ids,
}
#define PCI_VID_INTEL
Definition: pci_ids.h:2157
static struct device_operations device_ops
Definition: pcie.c:209
static const unsigned short i82801gx_pcie_ids[]
Definition: pcie.c:219

Definition at line 219 of file pcie.c.

◆ device_ops

struct device_operations device_ops
static
Initial value:
= {
.read_resources = pci_bus_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_bus_enable_resources,
.init = pci_init,
.enable = ich_pcie_enable,
.scan_bus = pci_scan_bridge,
.ops_pci = &pci_dev_ops_pci,
}
void pci_bus_enable_resources(struct device *dev)
Definition: pci_device.c:758
void pci_bus_read_resources(struct device *dev)
Definition: pci_device.c:540
void pci_scan_bridge(struct device *dev)
Scan a PCI bridge and the buses behind the bridge.
Definition: pci_device.c:1598
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
static void pci_init(struct device *dev)
Definition: pcie.c:41
static void ich_pcie_enable(struct device *dev)
Definition: pcie.c:196

Definition at line 196 of file pcie.c.

◆ i82801gx_pcie_ids

const unsigned short i82801gx_pcie_ids[]
static
Initial value:
= {
0x27d0,
0x27d2,
0x27d4,
0x27d6,
0x27e0,
0x27e2,
0
}

Definition at line 219 of file pcie.c.

◆ rpc