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

Go to the source code of this file.

Macros

#define IOBP_RETRY   1000
 

Functions

int pch_silicon_revision (void)
 
int pch_silicon_type (void)
 
static int pch_silicon_supported (int type, int rev)
 
static int iobp_poll (void)
 
void pch_iobp_update (u32 address, u32 andvalue, u32 orvalue)
 
static void pch_hide_devfn (unsigned int devfn)
 
static int pch_pcie_check_set_enabled (struct device *dev)
 
static void pch_pcie_function_swap (u8 old_fn, u8 new_fn)
 
static void pch_pcie_devicetree_update (struct southbridge_intel_bd82x6x_config *config)
 
static void pch_pcie_enable (struct device *dev)
 
void pch_enable (struct device *dev)
 

Variables

static u32 new_rpfn
 
struct chip_operations southbridge_intel_bd82x6x_ops
 

Macro Definition Documentation

◆ IOBP_RETRY

#define IOBP_RETRY   1000

Definition at line 69 of file pch.c.

Function Documentation

◆ iobp_poll()

static int iobp_poll ( void  )
inlinestatic

Definition at line 70 of file pch.c.

References BIOS_ERR, IOBP_RETRY, IOBPS, printk, RCBA32, and udelay().

Referenced by pch_iobp_update().

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

◆ pch_enable()

void pch_enable ( struct device dev)

◆ pch_hide_devfn()

static void pch_hide_devfn ( unsigned int  devfn)
static

◆ pch_iobp_update()

◆ pch_pcie_check_set_enabled()

static int pch_pcie_check_set_enabled ( struct device dev)
static

Definition at line 197 of file pch.c.

References all_devices, BIOS_DEBUG, dev_path(), pci_path::devfn, device::path, device_path::pci, PCI_FUNC, PCI_SLOT, and printk.

Referenced by pch_pcie_enable().

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

◆ pch_pcie_devicetree_update()

static void pch_pcie_devicetree_update ( struct southbridge_intel_bd82x6x_config config)
static

Definition at line 244 of file pch.c.

References all_devices, BIOS_DEBUG, config, pci_path::devfn, memcpy(), new_rpfn, device::next, device::path, PCH_PCIE_DEV_SLOT, device_path::pci, PCI_DEVFN, PCI_FUNC, PCI_SLOT, printk, and RPFN_FNGET.

Referenced by pch_pcie_enable().

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

◆ pch_pcie_enable()

◆ pch_pcie_function_swap()

static void pch_pcie_function_swap ( u8  old_fn,
u8  new_fn 
)
static

Definition at line 229 of file pch.c.

References BIOS_DEBUG, new_rpfn, printk, RPFN_FNGET, RPFN_FNMASK, and RPFN_FNSET.

Referenced by pch_pcie_enable().

Here is the caller graph for this function:

◆ pch_silicon_revision()

int pch_silicon_revision ( void  )

Definition at line 14 of file pch.c.

References PCI_DEV, pci_read_config8(), PCI_REVISION_ID, and pcidev_on_root().

Referenced by pch_silicon_supported(), and xhci_a0_suspend_smm_workaround().

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

◆ pch_silicon_supported()

static int pch_silicon_supported ( int  type,
int  rev 
)
static

Definition at line 44 of file pch.c.

References pch_silicon_revision(), pch_silicon_type(), PCH_TYPE_CPT, PCH_TYPE_PPT, and type.

Referenced by pch_iobp_update(), and pch_pcie_enable().

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

◆ pch_silicon_type()

int pch_silicon_type ( void  )

Definition at line 29 of file pch.c.

References pch_type(), PCI_DEV, PCI_DEVICE_ID, pci_read_config8(), and pcidev_on_root().

Referenced by lpc_init(), pch_hide_devfn(), pch_silicon_supported(), and southbridge_smm_xhci_sleep().

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

Variable Documentation

◆ new_rpfn

u32 new_rpfn
static

Definition at line 226 of file pch.c.

Referenced by pch_pcie_devicetree_update(), pch_pcie_enable(), and pch_pcie_function_swap().

◆ southbridge_intel_bd82x6x_ops

struct chip_operations southbridge_intel_bd82x6x_ops
Initial value:
= {
.enable_dev = pch_enable,
}
void pch_enable(struct device *dev)
Definition: pch.c:404

Definition at line 404 of file pch.c.