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

Go to the source code of this file.

Data Structures

struct  win_perbit_dly
 
struct  vref_perbit_dly
 
struct  tx_dly_tune
 
struct  per_byte_dly
 

Macros

#define WRITE_LEVELING_MOVD_DQS   1
 
#define TEST2_1_CAL   0x55000000
 
#define TEST2_2_CAL   0xaa000400
 

Enumerations

enum  {
  RX_VREF_BEGIN = 0 , RX_VREF_END = 31 , RX_VREF_STEP = 1 , TX_VREF_BEGIN = 0 ,
  TX_VREF_END = 50 , TX_VREF_STEP = 2
}
 
enum  { FIRST_DQ_DELAY = 0 , FIRST_DQS_DELAY = -48 , MAX_DQDLY_TAPS = 16 , MAX_RX_DQDLY_TAPS = 63 }
 
enum  CAL_TYPE { RX_WIN_RD_DQC = 0 , RX_WIN_TEST_ENG , TX_WIN_DQ_ONLY , TX_WIN_DQ_DQM }
 
enum  RX_TYPE { RX_DQ = 0 , RX_DQM , RX_DQS }
 

Functions

static void dramc_auto_refresh_switch (u8 chn, bool option)
 
static u16 dramc_mode_reg_read (u8 chn, u8 mr_idx)
 
void dramc_mode_reg_write (u8 chn, u8 mr_idx, u8 value)
 
static u8 dramc_mode_reg_read_by_rank (u8 chn, u8 rank, u8 mr_idx)
 
static void dramc_mode_reg_write_by_rank (u8 chn, u8 rank, u8 mr_idx, u8 value)
 
static void move_dramc_delay (u32 *reg_0, u32 *reg_1, u8 shift, s8 shift_coarse_tune)
 
static void move_dramc_tx_dqs (u8 chn, u8 byte, s8 shift_coarse_tune)
 
static void move_dramc_tx_dqs_oen (u8 chn, u8 byte, s8 shift_coarse_tune)
 
static void move_dramc_tx_dq (u8 chn, u8 rank, u8 byte, s8 shift_coarse_tune)
 
static void move_dramc_tx_dq_oen (u8 chn, u8 rank, u8 byte, s8 shift_coarse_tune)
 
static void write_leveling_move_dqs_instead_of_clk (u8 chn)
 
static void dramc_write_leveling (u8 chn, u8 rank, u8 freq_group, const u8 wr_level[CHANNEL_MAX][RANK_MAX][DQS_NUMBER])
 
static void cbt_set_perbit_delay_cell (u8 chn, u8 rank)
 
static void set_dram_mr_cbt_on_off (u8 chn, u8 rank, u8 fsp, bool cbt_on, struct mr_value *mr, u32 cbt_mode)
 
static void cbt_set_fsp (u8 chn, u8 rank, u8 fsp, struct mr_value *mr)
 
static void o1_path_on_off (u8 cbt_on)
 
static void cbt_entry (u8 chn, u8 rank, u8 fsp, struct mr_value *mr, u32 cbt_mode)
 
static void cbt_exit (u8 chn, u8 rank, u8 fsp, struct mr_value *mr, u32 cbt_mode)
 
static void cbt_set_vref (u8 chn, u8 rank, u8 vref, bool is_final, u32 cbt_mode)
 
static void cbt_set_ca_clk_result (u8 chn, u8 rank, const struct sdram_params *params)
 
static u8 get_cbt_vref_pinmux_value (u8 chn, u8 vref_level, u32 cbt_mode)
 
static void cbt_dramc_dfs_direct_jump (u8 shu_level, bool run_dvfs)
 
static void cbt_switch_freq (cbt_freq freq, bool run_dvfs)
 
static void dramc_cmd_bus_training (u8 chn, u8 rank, u8 freq_group, const struct sdram_params *params, struct mr_value *mr, bool run_dvfs)
 
static void dramc_read_dbi_onoff (size_t chn, bool on)
 
static void dramc_write_dbi_onoff (size_t chn, bool onoff)
 
static void dramc_phy_dcm_2_channel (u8 chn, bool en)
 
void dramc_enable_phy_dcm (u8 chn, bool en)
 
static void dramc_reset_delay_chain_before_calibration (size_t chn)
 
void dramc_hw_gating_onoff (u8 chn, bool on)
 
static void dramc_rx_input_delay_tracking_init_by_freq (u8 chn, u8 freq_group)
 
void dramc_apply_config_before_calibration (u8 freq_group, u32 cbt_mode)
 
static void dramc_set_mr13_vrcg_to_normal (u8 chn, const struct mr_value *mr, u32 rk_num)
 
void dramc_apply_config_after_calibration (const struct mr_value *mr, u32 rk_num)
 
static void dramc_rx_dqs_isi_pulse_cg_switch (u8 chn, bool flag)
 
static void dramc_set_rank_engine2 (u8 chn, u8 rank)
 
static void dramc_engine2_setpat (u8 chn, bool test_pat)
 
static void dramc_engine2_init (u8 chn, u8 rank, u32 t2_1, u32 t2_2, bool test_pat)
 
static void dramc_engine2_check_complete (u8 chn, u8 status)
 
static void dramc_engine2_compare (u8 chn, enum dram_te_op wr)
 
static u32 dramc_engine2_run (u8 chn, enum dram_te_op wr)
 
static void dramc_engine2_end (u8 chn, u32 dummy_rd)
 
static bool dramc_find_gating_window (u32 result_r, u32 result_f, u32 *debug_cnt, u8 dly_coarse_large, u8 dly_coarse_0p5t, u8 *pass_begin, u8 *pass_count, u8 *pass_count_1, u8 *dly_fine_xt, u8 *dqs_high, u8 *dqs_done)
 
static void dramc_find_dly_tune (u8 chn, u8 dly_coarse_large, u8 dly_coarse_0p5t, u8 dly_fine_xt, u8 *dqs_high, u8 *dly_coarse_large_cnt, u8 *dly_coarse_0p5t_cnt, u8 *dly_fine_tune_cnt, u8 *dqs_trans, u8 *dqs_done)
 
static void dram_phy_reset (u8 chn)
 
static void dramc_set_gating_mode (u8 chn, bool mode)
 
static void dramc_rx_dqs_gating_cal_pre (u8 chn, u8 rank)
 
static void set_selph_gating_value (uint32_t *addr, u8 dly, u8 dly_p1)
 
static void dramc_write_dqs_gating_result (u8 chn, u8 rank, u8 *best_coarse_tune2t, u8 *best_coarse_tune0p5t, u8 *best_coarse_tune2t_p1, u8 *best_coarse_tune0p5t_p1)
 
static void dramc_rx_dqs_gating_cal_partial (u8 chn, u8 rank, u32 coarse_start, u32 coarse_end, u8 freqDiv, u8 *pass_begin, u8 *pass_count, u8 *pass_count_1, u8 *dqs_done, u8 *dqs_high, u8 *dqs_transition, u8 *dly_coarse_large_cnt, u8 *dly_coarse_0p5t_cnt, u8 *dly_fine_tune_cnt)
 
static void dramc_rx_dqs_gating_cal (u8 chn, u8 rank, u8 freq_group, const struct sdram_params *params, const bool fast_calib, const struct mr_value *mr)
 
static void dramc_rx_rd_dqc_init (u8 chn, u8 rank)
 
static u32 dramc_rx_rd_dqc_run (u8 chn)
 
static void dramc_rx_rd_dqc_end (u8 chn)
 
static void dramc_rx_vref_pre_setting (u8 chn)
 
static void dramc_set_rx_vref (u8 chn, u8 vref)
 
static void dramc_set_tx_vref (u8 chn, u8 rank, u8 value)
 
static void dramc_set_vref (u8 chn, u8 rank, enum CAL_TYPE type, u8 vref)
 
static void dramc_transfer_dly_tune (u8 chn, u32 dly, u32 adjust_center, struct tx_dly_tune *dly_tune)
 
static void dramc_set_rx_dly_factor (u8 chn, u8 rank, enum RX_TYPE type, u32 val)
 
static void dramc_set_tx_dly_factor (u8 chn, u8 rk, enum CAL_TYPE type, u8 *dq_small_reg, u32 dly)
 
static u32 dramc_get_smallest_dqs_dly (u8 chn, u8 rank, const struct sdram_params *params)
 
static void dramc_get_dly_range (u8 chn, u8 rank, enum CAL_TYPE type, u8 freq_group, u16 *pre_cal, s16 *begin, s16 *end, const struct sdram_params *params)
 
static int dramc_check_dqdqs_win (struct win_perbit_dly *perbit_dly, s16 dly, s16 dly_end, bool fail_bit)
 
static void dramc_set_vref_dly (struct vref_perbit_dly *vref_dly, struct win_perbit_dly delay[])
 
static bool dramk_calc_best_vref (enum CAL_TYPE type, u8 vref, struct vref_perbit_dly *vref_dly, struct win_perbit_dly delay[], u32 *win_min_max)
 
static void dramc_set_rx_dqdqs_dly (u8 chn, u8 rank, s32 dly)
 
static void dramc_set_tx_best_dly_factor (u8 chn, u8 rank_start, u8 type, struct per_byte_dly *tx_perbyte_dly, u16 *dq_precal_dly, u8 use_delay_cell, u32 *byte_dly_cell)
 
static void dramc_set_rx_best_dly_factor (u8 chn, u8 rank, struct win_perbit_dly *dly, s32 *dqsdly_byte, s32 *dqmdly_byte)
 
static void dramc_set_dqdqs_dly (u8 chn, u8 rank, enum CAL_TYPE type, u8 *small_value, s32 dly)
 
static void dramc_set_tx_dly_center (struct per_byte_dly *center_dly, const struct win_perbit_dly *vref_dly)
 
static u32 get_freq_group_clock (u8 freq_group)
 
static void dramc_set_tx_best_dly (u8 chn, u8 rank, bool bypass_tx, struct win_perbit_dly *vref_dly, enum CAL_TYPE type, u8 freq_group, u16 *tx_dq_precal_result, u16 dly_cell_unit, const struct sdram_params *params, const bool fast_calib)
 
static int dramc_set_rx_best_dly (u8 chn, u8 rank, struct win_perbit_dly *perbit_dly)
 
static void dramc_get_vref_prop (u8 rank, enum CAL_TYPE type, u8 fsp, u8 *vref_scan_en, u8 *vref_begin, u8 *vref_end)
 
static u32 dram_k_perbit (u8 chn, enum CAL_TYPE type)
 
static void dramc_window_perbit_cal_partial (u8 chn, u8 rank, s16 dly_begin, s16 dly_end, s16 dly_step, enum CAL_TYPE type, u8 *small_value, u8 vref_scan_enable, struct win_perbit_dly *win_perbit)
 
static u8 dramc_window_perbit_cal (u8 chn, u8 rank, u8 freq_group, enum CAL_TYPE type, const struct sdram_params *params, const bool fast_calib)
 
static void dramc_dle_factor_handler (u8 chn, u8 val, u8 freq_group)
 
static u8 dramc_rx_datlat_cal (u8 chn, u8 rank, u8 freq_group, const struct sdram_params *params, const bool fast_calib, bool *test_passed)
 
static void dramc_dual_rank_rx_datlat_cal (u8 chn, u8 freq_group, u8 datlat0, u8 datlat1)
 
static void dramc_rx_dqs_gating_post_process (u8 chn, u8 freq_group, u32 rk_num)
 
static void start_dqsosc (u8 chn)
 
static void dqsosc_auto (u8 chn, u8 rank, u8 freq_group, u16 *osc_thrd_inc, u16 *osc_thrd_dec)
 
void dramc_hw_dqsosc (u8 chn, u32 rk_num)
 
static void dqsosc_shu_settings (u8 chn, u8 freq_group, u16 *osc_thrd_inc, u16 *osc_thrd_dec)
 
void dramc_dqs_precalculation_preset (void)
 
void get_dram_info_after_cal (u8 *density_result, u32 rk_num)
 
int dramc_calibrate_all_channels (const struct sdram_params *pams, u8 freq_group, struct mr_value *mr, bool run_dvfs)
 

Variables

static const u8 lp4_ca_mapping_pop [CHANNEL_MAX][CA_NUM_LP4]
 

Macro Definition Documentation

◆ TEST2_1_CAL

#define TEST2_1_CAL   0x55000000

Definition at line 31 of file dramc_pi_calibration_api.c.

◆ TEST2_2_CAL

#define TEST2_2_CAL   0xaa000400

Definition at line 32 of file dramc_pi_calibration_api.c.

◆ WRITE_LEVELING_MOVD_DQS

#define WRITE_LEVELING_MOVD_DQS   1

Definition at line 30 of file dramc_pi_calibration_api.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RX_VREF_BEGIN 
RX_VREF_END 
RX_VREF_STEP 
TX_VREF_BEGIN 
TX_VREF_END 
TX_VREF_STEP 

Definition at line 14 of file dramc_pi_calibration_api.c.

◆ anonymous enum

anonymous enum
Enumerator
FIRST_DQ_DELAY 
FIRST_DQS_DELAY 
MAX_DQDLY_TAPS 
MAX_RX_DQDLY_TAPS 

Definition at line 23 of file dramc_pi_calibration_api.c.

◆ CAL_TYPE

enum CAL_TYPE
Enumerator
RX_WIN_RD_DQC 
RX_WIN_TEST_ENG 
TX_WIN_DQ_ONLY 
TX_WIN_DQ_DQM 

Definition at line 34 of file dramc_pi_calibration_api.c.

◆ RX_TYPE

enum RX_TYPE
Enumerator
RX_DQ 
RX_DQM 
RX_DQS 

Definition at line 41 of file dramc_pi_calibration_api.c.

Function Documentation

◆ cbt_dramc_dfs_direct_jump()

static void cbt_dramc_dfs_direct_jump ( u8  shu_level,
bool  run_dvfs 
)
static

Definition at line 427 of file dramc_pi_calibration_api.c.

References ch, CHANNEL_MAX, dramc_dbg, mtk_spm_regs::dramc_dpy_clk_sw_con, mtk_spm, READ32_BITFIELD, SET32_BITFIELDS, mtk_spm_regs::spm_power_on_val0, and udelay().

Referenced by cbt_switch_freq().

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

◆ cbt_entry()

static void cbt_entry ( u8  chn,
u8  rank,
u8  fsp,
struct mr_value mr,
u32  cbt_mode 
)
static

Definition at line 328 of file dramc_pi_calibration_api.c.

References ch, CKE_FIXOFF, CKE_FIXON, dramc_cke_fix_onoff(), o1_path_on_off(), SET32_BITFIELDS, set_dram_mr_cbt_on_off(), and udelay().

Referenced by dramc_cmd_bus_training().

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

◆ cbt_exit()

static void cbt_exit ( u8  chn,
u8  rank,
u8  fsp,
struct mr_value mr,
u32  cbt_mode 
)
static

Definition at line 347 of file dramc_pi_calibration_api.c.

References ch, CKE_FIXON, dramc_cke_fix_onoff(), o1_path_on_off(), SET32_BITFIELDS, set_dram_mr_cbt_on_off(), and udelay().

Referenced by dramc_cmd_bus_training().

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

◆ cbt_set_ca_clk_result()

static void cbt_set_ca_clk_result ( u8  chn,
u8  rank,
const struct sdram_params params 
)
static

Definition at line 377 of file dramc_pi_calibration_api.c.

References ch, lp4_ca_mapping_pop, params, SET32_BITFIELDS, and udelay().

Referenced by dramc_cmd_bus_training().

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

◆ cbt_set_fsp()

static void cbt_set_fsp ( u8  chn,
u8  rank,
u8  fsp,
struct mr_value mr 
)
static

Definition at line 294 of file dramc_pi_calibration_api.c.

References BIT, dramc_mode_reg_write_by_rank(), FSP_0, and mr_value::MR13Value.

Referenced by dramc_cmd_bus_training().

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

◆ cbt_set_perbit_delay_cell()

static void cbt_set_perbit_delay_cell ( u8  chn,
u8  rank 
)
static

Definition at line 257 of file dramc_pi_calibration_api.c.

References ch, and SET32_BITFIELDS.

Referenced by dramc_cmd_bus_training().

Here is the caller graph for this function:

◆ cbt_set_vref()

static void cbt_set_vref ( u8  chn,
u8  rank,
u8  vref,
bool  is_final,
u32  cbt_mode 
)
static

Definition at line 359 of file dramc_pi_calibration_api.c.

References BIT, ch, dramc_dbg, dramc_mode_reg_write_by_rank(), SET32_BITFIELDS, and udelay().

Referenced by dramc_cmd_bus_training().

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

◆ cbt_switch_freq()

static void cbt_switch_freq ( cbt_freq  freq,
bool  run_dvfs 
)
static

Definition at line 510 of file dramc_pi_calibration_api.c.

References cbt_dramc_dfs_direct_jump(), CBT_LOW_FREQ, DRAM_DFS_SHUFFLE_1, and DRAM_DFS_SHUFFLE_MAX.

Referenced by dramc_cmd_bus_training().

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

◆ dqsosc_auto()

static void dqsosc_auto ( u8  chn,
u8  rank,
u8  freq_group,
u16 osc_thrd_inc,
u16 osc_thrd_dec 
)
static

◆ dqsosc_shu_settings()

static void dqsosc_shu_settings ( u8  chn,
u8  freq_group,
u16 osc_thrd_inc,
u16 osc_thrd_dec 
)
static

Definition at line 2610 of file dramc_pi_calibration_api.c.

References ch, die(), LP4X_DDR1600, LP4X_DDR2400, LP4X_DDR3200, LP4X_DDR3600, MR23_DEFAULT_VALUE, RANK_0, RANK_MAX, and SET32_BITFIELDS.

Referenced by dramc_calibrate_all_channels().

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

◆ dram_k_perbit()

static u32 dram_k_perbit ( u8  chn,
enum CAL_TYPE  type 
)
static

Definition at line 2106 of file dramc_pi_calibration_api.c.

References dramc_engine2_run(), dramc_engine2_setpat(), dramc_rx_rd_dqc_run(), RX_WIN_RD_DQC, RX_WIN_TEST_ENG, TE_OP_WRITE_READ_CHECK, and type.

Here is the call graph for this function:

◆ dram_phy_reset()

static void dram_phy_reset ( u8  chn)
static

Definition at line 1089 of file dramc_pi_calibration_api.c.

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

Referenced by dramc_dle_factor_handler(), dramc_rx_dqs_gating_cal(), dramc_rx_dqs_gating_cal_partial(), dramc_set_rx_best_dly_factor(), and dramc_set_rx_dqdqs_dly().

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

◆ dramc_apply_config_after_calibration()

void dramc_apply_config_after_calibration ( const struct mr_value mr,
u32  rk_num 
)

Definition at line 816 of file dramc_pi_calibration_api.c.

References ch, CHANNEL_MAX, CKE_DYNAMIC, clrbits32, clrsetbits32, DRAM_DFS_SHUFFLE_MAX, dramc_cke_fix_onoff(), dramc_set_mr13_vrcg_to_normal(), setbits32, and write32().

Referenced by after_calib().

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

◆ dramc_apply_config_before_calibration()

◆ dramc_auto_refresh_switch()

static void dramc_auto_refresh_switch ( u8  chn,
bool  option 
)
static

Definition at line 81 of file dramc_pi_calibration_api.c.

References ch, READ32_BITFIELD, SET32_BITFIELDS, and udelay().

Referenced by dramc_calibrate_all_channels(), dramc_cmd_bus_training(), and dramc_write_leveling().

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

◆ dramc_calibrate_all_channels()

◆ dramc_check_dqdqs_win()

static int dramc_check_dqdqs_win ( struct win_perbit_dly perbit_dly,
s16  dly,
s16  dly_end,
bool  fail_bit 
)
static

◆ dramc_cmd_bus_training()

static void dramc_cmd_bus_training ( u8  chn,
u8  rank,
u8  freq_group,
const struct sdram_params params,
struct mr_value mr,
bool  run_dvfs 
)
static

◆ dramc_dle_factor_handler()

static void dramc_dle_factor_handler ( u8  chn,
u8  val,
u8  freq_group 
)
static

Definition at line 2313 of file dramc_pi_calibration_api.c.

References ch, dram_phy_reset(), LP4X_DDR3200, LP4X_DDR3600, MAX, SET32_BITFIELDS, and val.

Referenced by dramc_dual_rank_rx_datlat_cal(), and dramc_rx_datlat_cal().

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

◆ dramc_dqs_precalculation_preset()

void dramc_dqs_precalculation_preset ( void  )

Definition at line 2688 of file dramc_pi_calibration_api.c.

References ch, CHANNEL_MAX, DIV_ROUND_CLOSEST, DRAM_DFS_SHUFFLE_MAX, dramc_dbg, get_shu_freq(), HW_REG_SHUFFLE_MAX, dramc_ao_regs_rk::pre_tdqsck, RANK_0, RANK_MAX, READ32_BITFIELD, and SET32_BITFIELDS.

Referenced by dramc_runtime_config().

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

◆ dramc_dual_rank_rx_datlat_cal()

static void dramc_dual_rank_rx_datlat_cal ( u8  chn,
u8  freq_group,
u8  datlat0,
u8  datlat1 
)
static

Definition at line 2407 of file dramc_pi_calibration_api.c.

References dramc_dle_factor_handler(), and MAX.

Referenced by dramc_calibrate_all_channels().

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

◆ dramc_enable_phy_dcm()

void dramc_enable_phy_dcm ( u8  chn,
bool  en 
)

Definition at line 642 of file dramc_pi_calibration_api.c.

References ch, clrbits32, clrsetbits32, DRAM_DFS_SHUFFLE_MAX, dramc_phy_dcm_2_channel(), mask, setbits32, value, and write32().

Referenced by dramc_apply_config_before_calibration(), and dramc_runtime_config().

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

◆ dramc_engine2_check_complete()

static void dramc_engine2_check_complete ( u8  chn,
u8  status 
)
static

Definition at line 920 of file dramc_pi_calibration_api.c.

References ch, dramc_dbg, read32(), and wait_us.

Referenced by dramc_engine2_compare().

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

◆ dramc_engine2_compare()

static void dramc_engine2_compare ( u8  chn,
enum dram_te_op  wr 
)
static

Definition at line 935 of file dramc_pi_calibration_api.c.

References ch, dramc_engine2_check_complete(), read32(), SET32_BITFIELDS, TE_OP_WRITE_READ_CHECK, and udelay().

Referenced by dramc_engine2_run().

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

◆ dramc_engine2_end()

static void dramc_engine2_end ( u8  chn,
u32  dummy_rd 
)
static

Definition at line 974 of file dramc_pi_calibration_api.c.

References ch, clrbits32, and write32().

Referenced by dramc_rx_datlat_cal(), dramc_rx_dqs_gating_cal(), and dramc_window_perbit_cal().

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

◆ dramc_engine2_init()

static void dramc_engine2_init ( u8  chn,
u8  rank,
u32  t2_1,
u32  t2_2,
bool  test_pat 
)
static

Definition at line 893 of file dramc_pi_calibration_api.c.

References ch, dramc_engine2_setpat(), dramc_set_rank_engine2(), and SET32_BITFIELDS.

Referenced by dramc_rx_datlat_cal(), dramc_rx_dqs_gating_cal(), and dramc_window_perbit_cal().

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

◆ dramc_engine2_run()

static u32 dramc_engine2_run ( u8  chn,
enum dram_te_op  wr 
)
static

Definition at line 951 of file dramc_pi_calibration_api.c.

References ch, dramc_engine2_compare(), read32(), SET32_BITFIELDS, TE_OP_READ_CHECK, TE_OP_WRITE_READ_CHECK, and udelay().

Referenced by dram_k_perbit(), dramc_rx_datlat_cal(), and dramc_rx_dqs_gating_cal_partial().

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

◆ dramc_engine2_setpat()

static void dramc_engine2_setpat ( u8  chn,
bool  test_pat 
)
static

Definition at line 869 of file dramc_pi_calibration_api.c.

References ch, and SET32_BITFIELDS.

Referenced by dram_k_perbit(), and dramc_engine2_init().

Here is the caller graph for this function:

◆ dramc_find_dly_tune()

static void dramc_find_dly_tune ( u8  chn,
u8  dly_coarse_large,
u8  dly_coarse_0p5t,
u8  dly_fine_xt,
u8 dqs_high,
u8 dly_coarse_large_cnt,
u8 dly_coarse_0p5t_cnt,
u8 dly_fine_tune_cnt,
u8 dqs_trans,
u8 dqs_done 
)
static

Definition at line 1047 of file dramc_pi_calibration_api.c.

References ch, DQS_GW_FINE_STEP, DQS_NUMBER, dramc_dbg, and read32().

Referenced by dramc_rx_dqs_gating_cal_partial().

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

◆ dramc_find_gating_window()

static bool dramc_find_gating_window ( u32  result_r,
u32  result_f,
u32 debug_cnt,
u8  dly_coarse_large,
u8  dly_coarse_0p5t,
u8 pass_begin,
u8 pass_count,
u8 pass_count_1,
u8 dly_fine_xt,
u8 dqs_high,
u8 dqs_done 
)
static

Definition at line 980 of file dramc_pi_calibration_api.c.

References DQS_GW_FINE_END, DQS_GW_FINE_STEP, DQS_NUMBER, dramc_dbg, and GATING_GOLDEND_DQSCNT.

Referenced by dramc_rx_dqs_gating_cal_partial().

Here is the caller graph for this function:

◆ dramc_get_dly_range()

static void dramc_get_dly_range ( u8  chn,
u8  rank,
enum CAL_TYPE  type,
u8  freq_group,
u16 pre_cal,
s16 begin,
s16 end,
const struct sdram_params params 
)
static

Definition at line 1634 of file dramc_pi_calibration_api.c.

References die(), dramc_err, dramc_get_smallest_dqs_dly(), LP4X_DDR1600, LP4X_DDR2400, LP4X_DDR3200, LP4X_DDR3600, MAX_RX_DQDLY_TAPS, MIN, params, RX_WIN_RD_DQC, RX_WIN_TEST_ENG, TX_WIN_DQ_DQM, TX_WIN_DQ_ONLY, and type.

Referenced by dramc_window_perbit_cal().

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

◆ dramc_get_smallest_dqs_dly()

static u32 dramc_get_smallest_dqs_dly ( u8  chn,
u8  rank,
const struct sdram_params params 
)
static

Definition at line 1616 of file dramc_pi_calibration_api.c.

References ch, DQS_NUMBER, MIN, params, and read32().

Referenced by dramc_get_dly_range().

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

◆ dramc_get_vref_prop()

static void dramc_get_vref_prop ( u8  rank,
enum CAL_TYPE  type,
u8  fsp,
u8 vref_scan_en,
u8 vref_begin,
u8 vref_end 
)
static

Definition at line 2080 of file dramc_pi_calibration_api.c.

References FSP_0, RANK_0, RX_VREF_END, RX_WIN_TEST_ENG, TX_VREF_BEGIN, TX_VREF_END, TX_WIN_DQ_ONLY, and type.

Referenced by dramc_window_perbit_cal().

Here is the caller graph for this function:

◆ dramc_hw_dqsosc()

void dramc_hw_dqsosc ( u8  chn,
u32  rk_num 
)

Definition at line 2570 of file dramc_pi_calibration_api.c.

References ch, DRAM_DFS_SHUFFLE_1, DRAM_DFS_SHUFFLE_2, DRAM_DFS_SHUFFLE_3, DRAM_DFS_SHUFFLE_MAX, get_shu_freq(), RANK_MAX, and SET32_BITFIELDS.

Referenced by dramc_runtime_config().

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

◆ dramc_hw_gating_onoff()

void dramc_hw_gating_onoff ( u8  chn,
bool  on 
)

Definition at line 699 of file dramc_pi_calibration_api.c.

References ch, and clrsetbits32.

Referenced by dramc_apply_config_before_calibration(), dramc_runtime_config(), and dramc_rx_dqs_gating_cal_pre().

Here is the caller graph for this function:

◆ dramc_mode_reg_read()

static u16 dramc_mode_reg_read ( u8  chn,
u8  mr_idx 
)
static

Definition at line 95 of file dramc_pi_calibration_api.c.

References ch, dramc_dbg, READ32_BITFIELD, SET32_BITFIELDS, udelay(), and value.

Referenced by dqsosc_auto(), and dramc_mode_reg_read_by_rank().

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

◆ dramc_mode_reg_read_by_rank()

static u8 dramc_mode_reg_read_by_rank ( u8  chn,
u8  rank,
u8  mr_idx 
)
static

Definition at line 133 of file dramc_pi_calibration_api.c.

References ch, dramc_dbg, dramc_mode_reg_read(), READ32_BITFIELD, SET32_BITFIELDS, and value.

Referenced by get_dram_info_after_cal().

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

◆ dramc_mode_reg_write()

void dramc_mode_reg_write ( u8  chn,
u8  mr_idx,
u8  value 
)

Definition at line 114 of file dramc_pi_calibration_api.c.

References ch, CKE_FIXON, dramc_cke_fix_onoff(), dramc_dbg, read32(), READ32_BITFIELD, SET32_BITFIELDS, udelay(), value, and write32().

Referenced by dqsosc_auto(), dramc_mode_reg_init(), and dramc_mode_reg_write_by_rank().

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

◆ dramc_mode_reg_write_by_rank()

static void dramc_mode_reg_write_by_rank ( u8  chn,
u8  rank,
u8  mr_idx,
u8  value 
)
static

Definition at line 146 of file dramc_pi_calibration_api.c.

References ch, dramc_dbg, dramc_mode_reg_write(), READ32_BITFIELD, SET32_BITFIELDS, and value.

Referenced by cbt_set_fsp(), cbt_set_vref(), dramc_rx_dqs_gating_cal(), dramc_set_mr13_vrcg_to_normal(), dramc_set_tx_vref(), and set_dram_mr_cbt_on_off().

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

◆ dramc_phy_dcm_2_channel()

static void dramc_phy_dcm_2_channel ( u8  chn,
bool  en 
)
static

Definition at line 625 of file dramc_pi_calibration_api.c.

References ch, clrbits32, clrsetbits32, and DRAM_DFS_SHUFFLE_MAX.

Referenced by dramc_enable_phy_dcm().

Here is the caller graph for this function:

◆ dramc_read_dbi_onoff()

static void dramc_read_dbi_onoff ( size_t  chn,
bool  on 
)
static

Definition at line 613 of file dramc_pi_calibration_api.c.

References ch, and SET32_BITFIELDS.

Referenced by dramc_apply_config_before_calibration().

Here is the caller graph for this function:

◆ dramc_reset_delay_chain_before_calibration()

static void dramc_reset_delay_chain_before_calibration ( size_t  chn)
static

Definition at line 686 of file dramc_pi_calibration_api.c.

References dramc_ddrphy_regs_shu_rk::b, dramc_ddrphy_regs_shu_rk::ca_cmd, ch, clrbits32, dramc_ddrphy_regs_shu_rk::dq, and RANK_MAX.

Referenced by dramc_apply_config_before_calibration().

Here is the caller graph for this function:

◆ dramc_rx_datlat_cal()

static u8 dramc_rx_datlat_cal ( u8  chn,
u8  rank,
u8  freq_group,
const struct sdram_params params,
const bool  fast_calib,
bool test_passed 
)
static

◆ dramc_rx_dqs_gating_cal()

◆ dramc_rx_dqs_gating_cal_partial()

static void dramc_rx_dqs_gating_cal_partial ( u8  chn,
u8  rank,
u32  coarse_start,
u32  coarse_end,
u8  freqDiv,
u8 pass_begin,
u8 pass_count,
u8 pass_count_1,
u8 dqs_done,
u8 dqs_high,
u8 dqs_transition,
u8 dly_coarse_large_cnt,
u8 dly_coarse_0p5t_cnt,
u8 dly_fine_tune_cnt 
)
static

◆ dramc_rx_dqs_gating_cal_pre()

static void dramc_rx_dqs_gating_cal_pre ( u8  chn,
u8  rank 
)
static

Definition at line 1127 of file dramc_pi_calibration_api.c.

References ch, dramc_hw_gating_onoff(), SET32_BITFIELDS, and udelay().

Referenced by dramc_rx_dqs_gating_cal().

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

◆ dramc_rx_dqs_gating_post_process()

static void dramc_rx_dqs_gating_post_process ( u8  chn,
u8  freq_group,
u32  rk_num 
)
static

Definition at line 2413 of file dramc_pi_calibration_api.c.

References ch, clrsetbits32, DQS_NUMBER, dramc_dbg, LP4X_DDR3200, LP4X_DDR3600, MAX, MIN, RANK_MAX, read32(), READ32_BITFIELD, and SET32_BITFIELDS.

Referenced by dramc_calibrate_all_channels().

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

◆ dramc_rx_dqs_isi_pulse_cg_switch()

static void dramc_rx_dqs_isi_pulse_cg_switch ( u8  chn,
bool  flag 
)
static

Definition at line 854 of file dramc_pi_calibration_api.c.

References ch, and clrsetbits32.

Referenced by dramc_rx_dqs_gating_cal(), and dramc_write_dqs_gating_result().

Here is the caller graph for this function:

◆ dramc_rx_input_delay_tracking_init_by_freq()

static void dramc_rx_input_delay_tracking_init_by_freq ( u8  chn,
u8  freq_group 
)
static

Definition at line 708 of file dramc_pi_calibration_api.c.

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

Referenced by dramc_apply_config_before_calibration().

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

◆ dramc_rx_rd_dqc_end()

static void dramc_rx_rd_dqc_end ( u8  chn)
static

Definition at line 1471 of file dramc_pi_calibration_api.c.

References ch, and SET32_BITFIELDS.

Referenced by dramc_window_perbit_cal().

Here is the caller graph for this function:

◆ dramc_rx_rd_dqc_init()

static void dramc_rx_rd_dqc_init ( u8  chn,
u8  rank 
)
static

Definition at line 1432 of file dramc_pi_calibration_api.c.

References ch, clrbits32, DQ_DATA_WIDTH, phy_mapping, and SET32_BITFIELDS.

Referenced by dramc_window_perbit_cal().

Here is the caller graph for this function:

◆ dramc_rx_rd_dqc_run()

static u32 dramc_rx_rd_dqc_run ( u8  chn)
static

Definition at line 1453 of file dramc_pi_calibration_api.c.

References ch, dramc_dbg, read32(), SET32_BITFIELDS, and wait_us.

Referenced by dram_k_perbit().

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

◆ dramc_rx_vref_pre_setting()

static void dramc_rx_vref_pre_setting ( u8  chn)
static

Definition at line 1476 of file dramc_pi_calibration_api.c.

References ch, and SET32_BITFIELDS.

Referenced by dramc_window_perbit_cal().

Here is the caller graph for this function:

◆ dramc_set_dqdqs_dly()

static void dramc_set_dqdqs_dly ( u8  chn,
u8  rank,
enum CAL_TYPE  type,
u8 small_value,
s32  dly 
)
static

Definition at line 1919 of file dramc_pi_calibration_api.c.

References dramc_set_rx_dqdqs_dly(), dramc_set_tx_dly_factor(), RX_WIN_RD_DQC, RX_WIN_TEST_ENG, and type.

Referenced by dramc_window_perbit_cal_partial().

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

◆ dramc_set_gating_mode()

static void dramc_set_gating_mode ( u8  chn,
bool  mode 
)
static

Definition at line 1103 of file dramc_pi_calibration_api.c.

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

Referenced by dramc_rx_dqs_gating_cal_partial().

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

◆ dramc_set_mr13_vrcg_to_normal()

static void dramc_set_mr13_vrcg_to_normal ( u8  chn,
const struct mr_value mr,
u32  rk_num 
)
static

Definition at line 806 of file dramc_pi_calibration_api.c.

References ch, clrbits32, DRAM_DFS_SHUFFLE_MAX, dramc_mode_reg_write_by_rank(), and mr_value::MR13Value.

Referenced by dramc_apply_config_after_calibration().

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

◆ dramc_set_rank_engine2()

static void dramc_set_rank_engine2 ( u8  chn,
u8  rank 
)
static

Definition at line 861 of file dramc_pi_calibration_api.c.

References ch, and SET32_BITFIELDS.

Referenced by dramc_engine2_init().

Here is the caller graph for this function:

◆ dramc_set_rx_best_dly()

static int dramc_set_rx_best_dly ( u8  chn,
u8  rank,
struct win_perbit_dly perbit_dly 
)
static

Definition at line 2048 of file dramc_pi_calibration_api.c.

References win_perbit_dly::best_dqdly, DQS_BIT_NUMBER, DQS_NUMBER, dramc_set_rx_best_dly_factor(), and win_perbit_dly::win_center.

Referenced by dramc_window_perbit_cal().

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

◆ dramc_set_rx_best_dly_factor()

static void dramc_set_rx_best_dly_factor ( u8  chn,
u8  rank,
struct win_perbit_dly dly,
s32 dqsdly_byte,
s32 dqmdly_byte 
)
static

Definition at line 1891 of file dramc_pi_calibration_api.c.

References win_perbit_dly::best_dqdly, ch, clrsetbits32, DQS_BIT_NUMBER, DQS_NUMBER, dram_phy_reset(), and value.

Referenced by dramc_set_rx_best_dly().

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

◆ dramc_set_rx_dly_factor()

static void dramc_set_rx_dly_factor ( u8  chn,
u8  rank,
enum RX_TYPE  type,
u32  val 
)
static

Definition at line 1531 of file dramc_pi_calibration_api.c.

References ch, dramc_err, RX_DQ, RX_DQM, RX_DQS, SET32_BITFIELDS, type, val, and WRITE32_BITFIELDS.

Referenced by dramc_set_rx_dqdqs_dly(), and dramc_window_perbit_cal().

Here is the caller graph for this function:

◆ dramc_set_rx_dqdqs_dly()

static void dramc_set_rx_dqdqs_dly ( u8  chn,
u8  rank,
s32  dly 
)
static

Definition at line 1807 of file dramc_pi_calibration_api.c.

References dram_phy_reset(), dramc_set_rx_dly_factor(), RX_DQ, RX_DQM, and RX_DQS.

Referenced by dramc_set_dqdqs_dly().

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

◆ dramc_set_rx_vref()

static void dramc_set_rx_vref ( u8  chn,
u8  vref 
)
static

Definition at line 1482 of file dramc_pi_calibration_api.c.

References ch, dramc_dbg, and SET32_BITFIELDS.

Referenced by dramc_set_vref().

Here is the caller graph for this function:

◆ dramc_set_tx_best_dly()

static void dramc_set_tx_best_dly ( u8  chn,
u8  rank,
bool  bypass_tx,
struct win_perbit_dly vref_dly,
enum CAL_TYPE  type,
u8  freq_group,
u16 tx_dq_precal_result,
u16  dly_cell_unit,
const struct sdram_params params,
const bool  fast_calib 
)
static

◆ dramc_set_tx_best_dly_factor()

static void dramc_set_tx_best_dly_factor ( u8  chn,
u8  rank_start,
u8  type,
struct per_byte_dly tx_perbyte_dly,
u16 dq_precal_dly,
u8  use_delay_cell,
u32 byte_dly_cell 
)
static

◆ dramc_set_tx_dly_center()

static void dramc_set_tx_dly_center ( struct per_byte_dly center_dly,
const struct win_perbit_dly vref_dly 
)
static

Definition at line 1927 of file dramc_pi_calibration_api.c.

References DQS_BIT_NUMBER, DQS_NUMBER, dramc_dbg, per_byte_dly::max_center, per_byte_dly::min_center, and win_perbit_dly::win_center.

Referenced by dramc_set_tx_best_dly().

Here is the caller graph for this function:

◆ dramc_set_tx_dly_factor()

static void dramc_set_tx_dly_factor ( u8  chn,
u8  rk,
enum CAL_TYPE  type,
u8 dq_small_reg,
u32  dly 
)
static

◆ dramc_set_tx_vref()

static void dramc_set_tx_vref ( u8  chn,
u8  rank,
u8  value 
)
static

Definition at line 1490 of file dramc_pi_calibration_api.c.

References dramc_mode_reg_write_by_rank(), and value.

Referenced by dramc_set_vref().

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

◆ dramc_set_vref()

static void dramc_set_vref ( u8  chn,
u8  rank,
enum CAL_TYPE  type,
u8  vref 
)
static

Definition at line 1495 of file dramc_pi_calibration_api.c.

References dramc_set_rx_vref(), dramc_set_tx_vref(), RX_WIN_TEST_ENG, and type.

Referenced by dramc_window_perbit_cal().

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

◆ dramc_set_vref_dly()

static void dramc_set_vref_dly ( struct vref_perbit_dly vref_dly,
struct win_perbit_dly  delay[] 
)
static

Definition at line 1709 of file dramc_pi_calibration_api.c.

References win_perbit_dly::best_dqdly, win_perbit_dly::best_first, win_perbit_dly::best_last, delay(), DQ_DATA_WIDTH, vref_perbit_dly::perbit_dly, and win_perbit_dly::win_center.

Referenced by dramk_calc_best_vref().

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

◆ dramc_transfer_dly_tune()

static void dramc_transfer_dly_tune ( u8  chn,
u32  dly,
u32  adjust_center,
struct tx_dly_tune dly_tune 
)
static

◆ dramc_window_perbit_cal()

◆ dramc_window_perbit_cal_partial()

static void dramc_window_perbit_cal_partial ( u8  chn,
u8  rank,
s16  dly_begin,
s16  dly_end,
s16  dly_step,
enum CAL_TYPE  type,
u8 small_value,
u8  vref_scan_enable,
struct win_perbit_dly win_perbit 
)
static

Definition at line 2123 of file dramc_pi_calibration_api.c.

References DQ_DATA_WIDTH, DQS_BIT_NUMBER, dram_k_perbit(), dramc_check_dqdqs_win(), dramc_dbg, dramc_set_dqdqs_dly(), and type.

Referenced by dramc_window_perbit_cal().

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

◆ dramc_write_dbi_onoff()

static void dramc_write_dbi_onoff ( size_t  chn,
bool  onoff 
)
static

Definition at line 620 of file dramc_pi_calibration_api.c.

References ch, and SET32_BITFIELDS.

Referenced by dramc_apply_config_before_calibration().

Here is the caller graph for this function:

◆ dramc_write_dqs_gating_result()

static void dramc_write_dqs_gating_result ( u8  chn,
u8  rank,
u8 best_coarse_tune2t,
u8 best_coarse_tune0p5t,
u8 best_coarse_tune2t_p1,
u8 best_coarse_tune0p5t_p1 
)
static

Definition at line 1153 of file dramc_pi_calibration_api.c.

References ch, clrsetbits32, DQS_NUMBER, dramc_dbg, and dramc_rx_dqs_isi_pulse_cg_switch().

Referenced by dramc_rx_dqs_gating_cal().

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

◆ dramc_write_leveling()

static void dramc_write_leveling ( u8  chn,
u8  rank,
u8  freq_group,
const u8  wr_level[CHANNEL_MAX][RANK_MAX][DQS_NUMBER] 
)
static

Definition at line 231 of file dramc_pi_calibration_api.c.

References ch, DQS_NUMBER, dramc_auto_refresh_switch(), move_dramc_tx_dq(), move_dramc_tx_dq_oen(), RANK_0, SET32_BITFIELDS, and write_leveling_move_dqs_instead_of_clk().

Referenced by dramc_calibrate_all_channels().

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

◆ dramk_calc_best_vref()

static bool dramk_calc_best_vref ( enum CAL_TYPE  type,
u8  vref,
struct vref_perbit_dly vref_dly,
struct win_perbit_dly  delay[],
u32 win_min_max 
)
static

Definition at line 1723 of file dramc_pi_calibration_api.c.

References vref_perbit_dly::best_vref, delay(), DQ_DATA_WIDTH, dramc_dbg, dramc_err, dramc_set_vref_dly(), vref_perbit_dly::max_win_sum, RX_WIN_RD_DQC, RX_WIN_TEST_ENG, TX_WIN_DQ_DQM, TX_WIN_DQ_ONLY, and type.

Referenced by dramc_window_perbit_cal().

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

◆ get_cbt_vref_pinmux_value()

static u8 get_cbt_vref_pinmux_value ( u8  chn,
u8  vref_level,
u32  cbt_mode 
)
static

Definition at line 405 of file dramc_pi_calibration_api.c.

References BIT, dramc_dbg, and phy_mapping.

Referenced by dramc_cmd_bus_training().

Here is the caller graph for this function:

◆ get_dram_info_after_cal()

void get_dram_info_after_cal ( u8 density_result,
u32  rk_num 
)

Definition at line 3052 of file dramc_pi_calibration_api.c.

References CHANNEL_A, dramc_dbg, dramc_mode_reg_read_by_rank(), dramc_show, and RANK_0.

Referenced by run_calib().

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

◆ get_freq_group_clock()

static u32 get_freq_group_clock ( u8  freq_group)
static

Definition at line 1952 of file dramc_pi_calibration_api.c.

References die(), LP4X_DDR1600, LP4X_DDR2400, LP4X_DDR3200, and LP4X_DDR3600.

Referenced by dqsosc_auto(), and dramc_set_tx_best_dly().

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

◆ move_dramc_delay()

static void move_dramc_delay ( u32 reg_0,
u32 reg_1,
u8  shift,
s8  shift_coarse_tune 
)
static

Definition at line 157 of file dramc_pi_calibration_api.c.

References clrsetbits32, DQ_DIV_MASK, DQ_DIV_SHIFT, and read32().

Referenced by move_dramc_tx_dq(), move_dramc_tx_dq_oen(), move_dramc_tx_dqs(), and move_dramc_tx_dqs_oen().

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

◆ move_dramc_tx_dq()

static void move_dramc_tx_dq ( u8  chn,
u8  rank,
u8  byte,
s8  shift_coarse_tune 
)
static

Definition at line 193 of file dramc_pi_calibration_api.c.

References ch, and move_dramc_delay().

Referenced by dramc_write_leveling(), and write_leveling_move_dqs_instead_of_clk().

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

◆ move_dramc_tx_dq_oen()

static void move_dramc_tx_dq_oen ( u8  chn,
u8  rank,
u8  byte,
s8  shift_coarse_tune 
)
static

Definition at line 204 of file dramc_pi_calibration_api.c.

References ch, move_dramc_delay(), and OEN_SHIFT.

Referenced by dramc_write_leveling(), and write_leveling_move_dqs_instead_of_clk().

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

◆ move_dramc_tx_dqs()

static void move_dramc_tx_dqs ( u8  chn,
u8  byte,
s8  shift_coarse_tune 
)
static

Definition at line 180 of file dramc_pi_calibration_api.c.

References ch, and move_dramc_delay().

Referenced by write_leveling_move_dqs_instead_of_clk().

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

◆ move_dramc_tx_dqs_oen()

static void move_dramc_tx_dqs_oen ( u8  chn,
u8  byte,
s8  shift_coarse_tune 
)
static

Definition at line 186 of file dramc_pi_calibration_api.c.

References ch, move_dramc_delay(), and OEN_SHIFT.

Referenced by write_leveling_move_dqs_instead_of_clk().

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

◆ o1_path_on_off()

static void o1_path_on_off ( u8  cbt_on)
static

Definition at line 310 of file dramc_pi_calibration_api.c.

References ch, CHANNEL_MAX, SET32_BITFIELDS, and udelay().

Referenced by cbt_entry(), and cbt_exit().

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

◆ set_dram_mr_cbt_on_off()

static void set_dram_mr_cbt_on_off ( u8  chn,
u8  rank,
u8  fsp,
bool  cbt_on,
struct mr_value mr,
u32  cbt_mode 
)
static

Definition at line 268 of file dramc_pi_calibration_api.c.

References ch, dramc_mode_reg_write_by_rank(), FSP_1, mr_value::MR13Value, and SET32_BITFIELDS.

Referenced by cbt_entry(), and cbt_exit().

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

◆ set_selph_gating_value()

static void set_selph_gating_value ( uint32_t addr,
u8  dly,
u8  dly_p1 
)
static

Definition at line 1146 of file dramc_pi_calibration_api.c.

References addr, and clrsetbits32.

Referenced by dramc_rx_dqs_gating_cal_partial().

Here is the caller graph for this function:

◆ start_dqsosc()

static void start_dqsosc ( u8  chn)
static

Definition at line 2489 of file dramc_pi_calibration_api.c.

References ch, dramc_err, READ32_BITFIELD, SET32_BITFIELDS, and wait_us.

Referenced by dqsosc_auto().

Here is the caller graph for this function:

◆ write_leveling_move_dqs_instead_of_clk()

static void write_leveling_move_dqs_instead_of_clk ( u8  chn)
static

Definition at line 218 of file dramc_pi_calibration_api.c.

References DQS_NUMBER, move_dramc_tx_dq(), move_dramc_tx_dq_oen(), move_dramc_tx_dqs(), move_dramc_tx_dqs_oen(), RANK_0, RANK_MAX, and WRITE_LEVELING_MOVD_DQS.

Referenced by dramc_write_leveling().

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

Variable Documentation

◆ lp4_ca_mapping_pop

const u8 lp4_ca_mapping_pop[CHANNEL_MAX][CA_NUM_LP4]
static
Initial value:
= {
[CHANNEL_A] = {1, 4, 3, 2, 0, 5},
[CHANNEL_B] = {0, 3, 2, 4, 1, 5},
}
@ CHANNEL_A
Definition: dramc_soc.h:7
@ CHANNEL_B
Definition: dramc_soc.h:8

Definition at line 76 of file dramc_pi_calibration_api.c.

Referenced by cbt_set_ca_clk_result().