![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <console/console.h>
#include <soc/addressmap.h>
#include <soc/clock.h>
#include <soc/funitcfg.h>
#include <soc/nvidia/tegra/usb.h>
#include <soc/padconfig.h>
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | clk_dev_control |
struct | funit_cfg_data |
Macros | |
#define | CLK_SET_REGS(x) |
#define | FUNIT_DATA(funit_, loname_, clk_set_) |
#define | FUNIT_DATA_USB(funit_, clk_set_) |
Enumerations | |
enum | { CLK_L_SET = 0 , CLK_H_SET = 1 , CLK_U_SET = 2 , CLK_V_SET = 3 , CLK_W_SET = 4 , CLK_X_SET = 5 , CLK_Y_SET = 6 } |
Functions | |
_Static_assert (ARRAY_SIZE(funit_data)==FUNIT_INDEX_MAX, "funit_cfg_data array not filled out!") | |
static uint32_t | get_clk_src_freq (uint32_t clk_src_freq_id) |
static void | configure_clock (const struct funit_cfg *const entry, const struct funit_cfg_data *const funit) |
static int | is_usb (uint32_t idx) |
void | soc_configure_funits (const struct funit_cfg *const entries, size_t num) |
void __weak | usb_setup_utmip (void *usb_base) |
Variables | |
static const struct clk_dev_control | clk_data_arr [] |
static const struct funit_cfg_data | funit_data [] |
#define CLK_SET_REGS | ( | x | ) |
Definition at line 34 of file funitcfg.c.
#define FUNIT_DATA | ( | funit_, | |
loname_, | |||
clk_set_ | |||
) |
Definition at line 50 of file funitcfg.c.
#define FUNIT_DATA_USB | ( | funit_, | |
clk_set_ | |||
) |
Definition at line 59 of file funitcfg.c.
anonymous enum |
Enumerator | |
---|---|
CLK_L_SET | |
CLK_H_SET | |
CLK_U_SET | |
CLK_V_SET | |
CLK_W_SET | |
CLK_X_SET | |
CLK_Y_SET |
Definition at line 24 of file funitcfg.c.
_Static_assert | ( | ARRAY_SIZE(funit_data) | = =FUNIT_INDEX_MAX , |
"funit_cfg_data array not filled out!" | |||
) |
|
static |
Definition at line 102 of file funitcfg.c.
References _clock_set_div(), funit_cfg::clk_dev_freq_khz, CLK_DIV_MASK, CLK_DIV_MASK_I2C, funit_cfg::clk_src_freq_id, funit_cfg::clk_src_id, funit_cfg_data::clk_src_reg, get_clk_div, get_clk_src_freq(), get_i2c_clk_div, funit_cfg_data::name, strlen(), and strncmp().
Referenced by soc_configure_funits().
Definition at line 83 of file funitcfg.c.
References BIOS_SPEW, CLK_M, PLLP, printk, TEGRA_CLK_M_KHZ, and TEGRA_PLLP_KHZ.
Referenced by configure_clock().
|
inlinestatic |
Definition at line 127 of file funitcfg.c.
Referenced by soc_configure_funits().
Definition at line 132 of file funitcfg.c.
References BIOS_ERR, clk_dev_control::clk_enb_set, funit_cfg_data::clk_enb_val, clock_grp_enable_clear_reset(), configure_clock(), funit_cfg_data::ctlr_base, funit_cfg_data::dev_control, funit_data, funit_cfg::funit_index, FUNIT_INDEX_MAX, is_usb(), funit_cfg::pad_cfg, funit_cfg::pad_cfg_size, printk, clk_dev_control::rst_dev_clr, soc_configure_pads(), and usb_setup_utmip().
Referenced by bootblock_mainboard_init(), mainboard_init(), and setup_audio().
Definition at line 165 of file funitcfg.c.
References BIOS_ERR, and printk.
Referenced by soc_configure_funits().
|
static |
Definition at line 1 of file funitcfg.c.
|
static |
Definition at line 1 of file funitcfg.c.
Referenced by soc_configure_funits().