coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
clock.c File Reference
#include <assert.h>
#include <commonlib/helpers.h>
#include <delay.h>
#include <device/mmio.h>
#include <soc/clock.h>
#include <timer.h>
#include <types.h>
Include dependency graph for clock.c:

Go to the source code of this file.

Functions

static bool clock_is_off (u32 *cbcr_addr)
 
enum cb_err clock_enable_vote (void *cbcr_addr, void *vote_addr, uint32_t vote_bit)
 
enum cb_err clock_enable (void *cbcr_addr)
 
void clock_reset_bcr (void *bcr_addr, bool assert)
 
enum cb_err enable_and_poll_gdsc_status (void *gdscr_addr)
 
static void clock_configure_mnd (struct clock_rcg *clk, uint32_t m, uint32_t n, uint32_t d_2)
 
enum cb_err clock_configure (struct clock_rcg *clk, struct clock_freq_config *clk_cfg, uint32_t hz, uint32_t num_perfs)
 
void clock_configure_dfsr_table (int qup, struct clock_freq_config *clk_cfg, uint32_t num_perfs)
 
enum cb_err clock_configure_enable_gpll (struct alpha_pll_reg_val_config *cfg, bool enable, int br_enable)
 
enum cb_err agera_pll_enable (struct alpha_pll_reg_val_config *cfg)
 
enum cb_err zonda_pll_enable (struct alpha_pll_reg_val_config *cfg)
 
void clock_reset_subsystem (u32 *misc, u32 shft)
 

Function Documentation

◆ agera_pll_enable()

◆ clock_configure()

enum cb_err clock_configure ( struct clock_rcg clk,
struct clock_freq_config clk_cfg,
uint32_t  hz,
uint32_t  num_perfs 
)

◆ clock_configure_dfsr_table()

void clock_configure_dfsr_table ( int  qup,
struct clock_freq_config clk_cfg,
uint32_t  num_perfs 
)

Definition at line 124 of file clock.c.

Referenced by clock_configure_dfsr().

Here is the caller graph for this function:

◆ clock_configure_enable_gpll()

enum cb_err clock_configure_enable_gpll ( struct alpha_pll_reg_val_config cfg,
bool  enable,
int  br_enable 
)

Definition at line 124 of file clock.c.

Referenced by clock_configure_gpll0(), clock_configure_sdcc1(), and clock_configure_sdcc2().

Here is the caller graph for this function:

◆ clock_configure_mnd()

static void clock_configure_mnd ( struct clock_rcg clk,
uint32_t  m,
uint32_t  n,
uint32_t  d_2 
)
static

Definition at line 78 of file clock.c.

◆ clock_enable()

enum cb_err clock_enable ( void cbcr_addr)

Definition at line 12 of file clock.c.

References CLK_CTL_OFF_BMSK, and read32().

Referenced by clock_configure_qspi(), clock_configure_sdcc1(), clock_configure_sdcc2(), clock_disable_spi(), clock_enable_clear_reset(), clock_enable_i2c(), clock_enable_spi(), clock_enable_uart(), and mdss_clock_enable().

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

◆ clock_enable_vote()

enum cb_err clock_enable_vote ( void cbcr_addr,
void vote_addr,
uint32_t  vote_bit 
)

Definition at line 12 of file clock.c.

Referenced by clock_enable_qup(), and clock_init().

Here is the caller graph for this function:

◆ clock_is_off()

static bool clock_is_off ( u32 cbcr_addr)
static

Definition at line 12 of file clock.c.

◆ clock_reset_bcr()

void clock_reset_bcr ( void bcr_addr,
bool  assert 
)

Definition at line 54 of file clock.c.

References assert, BIT, CLK_CTL_BCR_BLK_SHFT, clrbits32, and setbits32.

Referenced by reset_usb(), and setup_usb_host().

Here is the caller graph for this function:

◆ clock_reset_subsystem()

void clock_reset_subsystem ( u32 misc,
u32  shft 
)

Definition at line 268 of file clock.c.

References BIT, clrbits32, and misc.

◆ enable_and_poll_gdsc_status()

enum cb_err enable_and_poll_gdsc_status ( void gdscr_addr)

Definition at line 54 of file clock.c.

◆ zonda_pll_enable()

enum cb_err zonda_pll_enable ( struct alpha_pll_reg_val_config cfg)

Definition at line 124 of file clock.c.