coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pmc.c File Reference
#include <bootstate.h>
#include <console/console.h>
#include <device/mmio.h>
#include <device/device.h>
#include <intelblocks/acpi.h>
#include <intelblocks/pmc.h>
#include <intelblocks/pmclib.h>
#include <intelblocks/rtc.h>
#include <soc/pci_devs.h>
#include <soc/pm.h>
#include <soc/soc_chip.h>
Include dependency graph for pmc.c:

Go to the source code of this file.

Functions

static void config_deep_sX (uint32_t offset, uint32_t mask, int sx, int enable)
 
static void config_deep_s5 (int on_ac, int on_dc)
 
static void config_deep_s3 (int on_ac, int on_dc)
 
static void config_deep_sx (uint32_t deepsx_config)
 
static void soc_pmc_enable (struct device *dev)
 
static void soc_pmc_read_resources (struct device *dev)
 
static void soc_pmc_init (struct device *dev)
 
static void pm1_enable_pwrbtn_smi (void *unused)
 
 BOOT_STATE_INIT_ENTRY (BS_DEV_INIT_CHIPS, BS_ON_EXIT, pm1_enable_pwrbtn_smi, NULL)
 
static void pmc_fill_ssdt (const struct device *dev)
 
static void pmc_final (struct device *dev)
 

Variables

struct device_operations pmc_ops
 

Function Documentation

◆ BOOT_STATE_INIT_ENTRY()

BOOT_STATE_INIT_ENTRY ( BS_DEV_INIT_CHIPS  ,
BS_ON_EXIT  ,
pm1_enable_pwrbtn_smi  ,
NULL   
)

◆ config_deep_s3()

static void config_deep_s3 ( int  on_ac,
int  on_dc 
)
static

Definition at line 39 of file pmc.c.

References config_deep_sX(), S3_PWRGATE_POL, S3AC_GATE_SUS, and S3DC_GATE_SUS.

Referenced by soc_pmc_enable().

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

◆ config_deep_s5()

static void config_deep_s5 ( int  on_ac,
int  on_dc 
)
static

Definition at line 30 of file pmc.c.

References config_deep_sX(), S4_PWRGATE_POL, S4AC_GATE_SUS, S4DC_GATE_SUS, S5_PWRGATE_POL, S5AC_GATE_SUS, and S5DC_GATE_SUS.

Referenced by soc_pmc_enable().

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

◆ config_deep_sx()

static void config_deep_sx ( uint32_t  deepsx_config)
static

Definition at line 45 of file pmc.c.

References DSX_CFG, DSX_CFG_MASK, pmc_mmio_regs(), read32(), and write32().

Referenced by soc_pmc_enable().

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

◆ config_deep_sX()

static void config_deep_sX ( uint32_t  offset,
uint32_t  mask,
int  sx,
int  enable 
)
static

Definition at line 15 of file pmc.c.

References BIOS_DEBUG, mask, offset, pmc_mmio_regs(), printk, read32(), and write32().

Referenced by config_deep_s3(), and config_deep_s5().

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

◆ pm1_enable_pwrbtn_smi()

static void pm1_enable_pwrbtn_smi ( void unused)
static

Definition at line 106 of file pmc.c.

References pmc_update_pm1_enable(), and PWRBTN_EN.

Here is the call graph for this function:

◆ pmc_fill_ssdt()

static void pmc_fill_ssdt ( const struct device dev)
static

Definition at line 114 of file pmc.c.

References CONFIG, and generate_acpi_power_engine().

Here is the call graph for this function:

◆ pmc_final()

static void pmc_final ( struct device dev)
static

Definition at line 131 of file pmc.c.

References pmc_clear_pmcon_sts().

Here is the call graph for this function:

◆ soc_pmc_enable()

static void soc_pmc_enable ( struct device dev)
static

Definition at line 56 of file pmc.c.

References config, config_deep_s3(), config_deep_s5(), config_deep_sx(), config_of_soc, pmc_gpe_init(), pmc_set_power_failure_state(), and rtc_init().

Here is the call graph for this function:

◆ soc_pmc_init()

static void soc_pmc_init ( struct device dev)
static

Definition at line 83 of file pmc.c.

References ACPI_TIM_DIS, CONFIG, PCH_PWRM_ACPI_TMR_CTL, pmc_mmio_regs(), pmc_set_acpi_mode(), and setbits8.

Here is the call graph for this function:

◆ soc_pmc_read_resources()

static void soc_pmc_read_resources ( struct device dev)
static

Variable Documentation

◆ pmc_ops

struct device_operations pmc_ops
Initial value:
= {
.read_resources = soc_pmc_read_resources,
.set_resources = noop_set_resources,
.init = soc_pmc_init,
.enable = soc_pmc_enable,
.final = pmc_final,
}
static void noop_set_resources(struct device *dev)
Definition: device.h:74
static void pmc_final(struct device *dev)
Definition: pmc.c:131
static void soc_pmc_enable(struct device *dev)
Definition: pmc.c:56
static void soc_pmc_read_resources(struct device *dev)
Definition: pmc.c:70
static void soc_pmc_init(struct device *dev)
Definition: pmc.c:83

Definition at line 131 of file pmc.c.