![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <console/console.h>
#include <delay.h>
#include <device/mmio.h>
#include <soc/clkbuf.h>
#include <soc/pmif.h>
Go to the source code of this file.
Macros | |
#define | BUFTAG "[CLKBUF]" |
#define | buf_info(fmt, arg ...) |
#define | _buf_clrset32_impl(addr, clear, set) buf_write(addr, (buf_read(addr) & ~((uint32_t)(clear))) | (set)) |
#define | BUF_SET_FIELDS(addr, ...) _BF_IMPL(_buf_clrset32_impl, addr, __VA_ARGS__) |
#define | BUF_READ_FIELD(addr, name) EXTRACT_BITFIELD(buf_read(addr), name) |
#define | PMIC_CW00_INIT_VAL 0x4005 /* 0100 0000 0000 0101 */ |
#define | PMIC_CW09_INIT_VAL 0x01F0 /* 0000 0001 1111 0000 */ |
Functions | |
static u32 | buf_read (u32 addr) |
static void | buf_write (u32 addr, u32 wdata) |
static void | dump_clkbuf_log (void) |
int | clk_buf_init (void) |
Variables | |
static struct pmif * | pmif_arb |
#define BUF_SET_FIELDS | ( | addr, | |
... | |||
) | _BF_IMPL(_buf_clrset32_impl, addr, __VA_ARGS__) |
Definition at line 29 of file clkbuf.c.
References addr, get_pmif_controller(), NULL, pmif_arb, PMIF_SPI, and pmif::read.
Definition at line 40 of file clkbuf.c.
References addr, get_pmif_controller(), NULL, pmif_arb, PMIF_SPI, and pmif::write.
int clk_buf_init | ( | void | ) |
Definition at line 78 of file clkbuf.c.
References BUF_SET_FIELDS, CONFIG, dump_clkbuf_log(), PMIC_CW00_INIT_VAL, PMIC_CW09_INIT_VAL, PMIC_RG_DCXO_ADLDO_BIAS_ELR_0, PMIC_RG_DCXO_ADLDO_BIAS_ELR_1, PMIC_RG_DCXO_CW00, PMIC_RG_DCXO_CW08, PMIC_RG_DCXO_CW09, PMIC_RG_LDO_VBBCK_CON0, PMIC_RG_LDO_VBBCK_OP_EN_SET, PMIC_RG_LDO_VRFCK_CON0, PMIC_RG_LDO_VRFCK_ELR, PMIC_RG_LDO_VRFCK_OP_EN_SET, PMIC_RG_TOP_SPI_CON1, PMIC_RG_XO_BUF_CTL0, PMIC_RG_XO_BUF_CTL1, PMIC_RG_XO_BUF_CTL2, PMIC_RG_XO_BUF_CTL3, PMIC_RG_XO_BUF_CTL4, PMIC_TOP_TMA_KEY, PMIC_TOP_TMA_KEY_UNLOCK, and udelay().
Referenced by platform_romstage_main().
Definition at line 47 of file clkbuf.c.
References buf_info, BUF_READ_FIELD, PMIC_RG_DCXO_ADLDO_BIAS_ELR_0, PMIC_RG_DCXO_CW00, PMIC_RG_DCXO_CW09, PMIC_RG_DCXO_CW12, PMIC_RG_DCXO_CW13, PMIC_RG_DCXO_CW15, PMIC_RG_DCXO_CW19, PMIC_RG_LDO_VBBCK_CON0, PMIC_RG_LDO_VBBCK_OP_EN, PMIC_RG_LDO_VRFCK_CON0, PMIC_RG_LDO_VRFCK_OP_EN, and PMIC_RG_TOP_SPI_CON1.
Referenced by clk_buf_init().
|
static |
Definition at line 27 of file clkbuf.c.
Referenced by buf_read(), buf_write(), pmic_read(), spmi_cali_rd_clock_polarity(), spmi_mst_init(), and spmi_read_check().