coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
dramc_init_setting.c File Reference
#include <console/console.h>
#include <device/mmio.h>
#include <delay.h>
#include <soc/emi.h>
#include <soc/dramc_pi_api.h>
#include <soc/dramc_param.h>
#include <soc/dramc_register.h>
#include <soc/infracfg.h>
#include <string.h>
#include <timer.h>
Include dependency graph for dramc_init_setting.c:

Go to the source code of this file.

Data Structures

struct  ac_time
 

Functions

void dramc_cke_fix_onoff (enum cke_type option, u8 chn)
 
static void dvfs_settings (u8 freq_group)
 
static void ddr_phy_pll_setting (u8 chn, u8 freq_group)
 
static void dramc_gating_mode (u8 mode)
 
static void update_initial_settings (u8 freq_group)
 
static void dramc_power_on_sequence (void)
 
static void ddr_phy_reserved_rg_setting (u8 freq_group)
 
static void dramc_duty_set_clk_delay (u8 chn, s8 clkDelay)
 
static void dramc_duty_set_dqs_delay (u8 chn, const s8 *s_dqsDelay)
 
static void dramc_duty_calibration (const struct sdram_params *params, u8 freq_group)
 
static u8 dramc_zq_calibration (u8 chn, u8 rank)
 
static void dramc_mode_reg_init (u8 freq_group, struct mr_value *mr, const struct sdram_params *params)
 
static void auto_refresh_cke_off (void)
 
static void dramc_setting_DDR1600 (u32 cbt_mode)
 
static void dramc_setting_DDR2400 (u32 cbt_mode)
 
static void dramc_setting_DDR3600 (void)
 
static void dramc_setting (const struct sdram_params *params, u8 freq_group, const struct dram_impedance *impedance)
 
static void ddr_update_ac_timing (u8 freq_group, u32 cbt_mode)
 
void dramc_init (const struct sdram_params *params, u8 freq_group, struct dram_shared_data *shared)
 

Variables

static const struct ac_time ac_timing_tbl [LP4X_DDRFREQ_MAX]
 
static const struct ac_time ac_timing_cbt_tbl [LP4X_DDRFREQ_MAX]
 

Function Documentation

◆ auto_refresh_cke_off()

static void auto_refresh_cke_off ( void  )
static

Definition at line 858 of file dramc_init_setting.c.

References ch, CHANNEL_A, CHANNEL_B, CHANNEL_MAX, CKE_FIXOFF, DRAMC_BROADCAST_OFF, dramc_cke_fix_onoff(), dramc_get_broadcast(), dramc_set_broadcast(), setbits32, and udelay().

Here is the call graph for this function:

◆ ddr_phy_pll_setting()

static void ddr_phy_pll_setting ( u8  chn,
u8  freq_group 
)
static

◆ ddr_phy_reserved_rg_setting()

static void ddr_phy_reserved_rg_setting ( u8  freq_group)
static

Definition at line 556 of file dramc_init_setting.c.

References ch, CHANNEL_MAX, clrsetbits32, FSP_0, get_freq_fsq(), and LP4X_DDR1600.

Here is the call graph for this function:

◆ ddr_update_ac_timing()

◆ dramc_cke_fix_onoff()

void dramc_cke_fix_onoff ( enum cke_type  option,
u8  chn 
)

◆ dramc_duty_calibration()

static void dramc_duty_calibration ( const struct sdram_params params,
u8  freq_group 
)
static

Definition at line 632 of file dramc_init_setting.c.

References CHANNEL_A, CHANNEL_B, CHANNEL_MAX, die(), DQS_NUMBER, dramc_dbg, dramc_duty_set_clk_delay(), dramc_duty_set_dqs_delay(), DRAMC_PARAM_SOURCE_FLASH, DRAMC_PARAM_SOURCE_SDRAM_CONFIG, LP4X_DDR1600, LP4X_DDR2400, LP4X_DDR3200, LP4X_DDR3600, and params.

Referenced by dramc_init().

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

◆ dramc_duty_set_clk_delay()

static void dramc_duty_set_clk_delay ( u8  chn,
s8  clkDelay 
)
static

Definition at line 592 of file dramc_init_setting.c.

References ch, clrsetbits32, and RANK_MAX.

Referenced by dramc_duty_calibration().

Here is the caller graph for this function:

◆ dramc_duty_set_dqs_delay()

static void dramc_duty_set_dqs_delay ( u8  chn,
const s8 s_dqsDelay 
)
static

Definition at line 611 of file dramc_init_setting.c.

References ch, clrsetbits32, DQS_NUMBER, and RANK_MAX.

Referenced by dramc_duty_calibration().

Here is the caller graph for this function:

◆ dramc_gating_mode()

static void dramc_gating_mode ( u8  mode)
static

Definition at line 313 of file dramc_init_setting.c.

References ch, clrbits32, clrsetbits32, setbits32, and udelay().

Referenced by update_initial_settings().

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

◆ dramc_init()

void dramc_init ( const struct sdram_params params,
u8  freq_group,
struct dram_shared_data shared 
)

◆ dramc_mode_reg_init()

static void dramc_mode_reg_init ( u8  freq_group,
struct mr_value mr,
const struct sdram_params params 
)
static

◆ dramc_power_on_sequence()

static void dramc_power_on_sequence ( void  )
static

Definition at line 535 of file dramc_init_setting.c.

References ch, CHANNEL_A, CHANNEL_B, CHANNEL_MAX, CKE_FIXOFF, CKE_FIXON, clrbits32, dramc_cke_fix_onoff(), setbits32, and udelay().

Referenced by dramc_mode_reg_init().

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

◆ dramc_setting()

static void dramc_setting ( const struct sdram_params params,
u8  freq_group,
const struct dram_impedance impedance 
)
static

Definition at line 1031 of file dramc_init_setting.c.

Referenced by dramc_init().

Here is the caller graph for this function:

◆ dramc_setting_DDR1600()

static void dramc_setting_DDR1600 ( u32  cbt_mode)
static

◆ dramc_setting_DDR2400()

static void dramc_setting_DDR2400 ( u32  cbt_mode)
static

◆ dramc_setting_DDR3600()

static void dramc_setting_DDR3600 ( void  )
static

Definition at line 1025 of file dramc_init_setting.c.

References ch, clrsetbits32, SELPH_DQS0_3600, and SELPH_DQS1_3600.

◆ dramc_zq_calibration()

static u8 dramc_zq_calibration ( u8  chn,
u8  rank 
)
static

Definition at line 695 of file dramc_init_setting.c.

References addr, ARRAY_SIZE, ch, CKE_FIXON, dramc_cke_fix_onoff(), dramc_dbg, read32(), SET32_BITFIELDS, setbits32, TIMEOUT_US, udelay(), value, wait_us, and write32().

Referenced by dramc_mode_reg_init().

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

◆ dvfs_settings()

static void dvfs_settings ( u8  freq_group)
static

Definition at line 29 of file dramc_init_setting.c.

References ch, CHANNEL_MAX, clrsetbits32, die(), LP4X_DDR1600, LP4X_DDR2400, LP4X_DDR3200, LP4X_DDR3600, and setbits32.

Referenced by dramc_init().

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

◆ update_initial_settings()

static void update_initial_settings ( u8  freq_group)
static

Variable Documentation

◆ ac_timing_cbt_tbl

const struct ac_time ac_timing_cbt_tbl[LP4X_DDRFREQ_MAX]
static

Definition at line 1031 of file dramc_init_setting.c.

Referenced by ddr_update_ac_timing().

◆ ac_timing_tbl

const struct ac_time ac_timing_tbl[LP4X_DDRFREQ_MAX]
static

Definition at line 1031 of file dramc_init_setting.c.

Referenced by ddr_update_ac_timing().