coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
power.c File Reference
#include <device/mmio.h>
#include <console/console.h>
#include <soc/addressmap.h>
#include <soc/clock.h>
#include <soc/flow.h>
#include <soc/pmc.h>
#include <soc/power.h>
Include dependency graph for power.c:

Go to the source code of this file.

Functions

static int partition_powered (int id)
 
static int partition_clamp_on (int id)
 
static void power_ungate_partition (uint32_t id)
 
void power_enable_and_ungate_cpu (void)
 
int power_reset_status (void)
 
void ram_repair (void)
 

Variables

static struct tegra_pmc_regs *const pmc = (void *)TEGRA_PMC_BASE
 
static struct flow_ctlr *const flow = (void *)TEGRA_FLOW_BASE
 

Function Documentation

◆ partition_clamp_on()

static int partition_clamp_on ( int  id)
static

Definition at line 19 of file power.c.

References tegra_pmc_regs::clamp_status, pmc, and read32().

Referenced by power_ungate_partition().

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

◆ partition_powered()

static int partition_powered ( int  id)
static

Definition at line 14 of file power.c.

References pmc, tegra_pmc_regs::pwrgate_status, and read32().

Referenced by power_ungate_partition().

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

◆ power_enable_and_ungate_cpu()

void power_enable_and_ungate_cpu ( void  )

Definition at line 52 of file power.c.

References tegra_pmc_regs::cntrl, tegra_pmc_regs::cpupwrgood_timer, pmc, PMC_CNTRL_CPUPWRREQ_OE, PMC_CNTRL_CPUPWRREQ_POLARITY, POWER_PARTID_C0NC, POWER_PARTID_CE0, POWER_PARTID_CRAIL, power_ungate_partition(), read32(), TEGRA_PCLK_KHZ, and write32().

Referenced by run_next_stage().

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

◆ power_reset_status()

int power_reset_status ( void  )

Definition at line 74 of file power.c.

References pmc, read32(), and tegra_pmc_regs::rst_status.

Referenced by romstage().

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

◆ power_ungate_partition()

static void power_ungate_partition ( uint32_t  id)
static

◆ ram_repair()

void ram_repair ( void  )

Definition at line 79 of file power.c.

References flow, flow_ctlr::ram_repair, flow_ctlr::ram_repair_cluster1, RAM_REPAIR_REQ, RAM_REPAIR_STS, read32(), and setbits32.

Here is the call graph for this function:

Variable Documentation

◆ flow

struct flow_ctlr* const flow = (void *)TEGRA_FLOW_BASE
static

Definition at line 12 of file power.c.

Referenced by ram_repair().

◆ pmc