struct gbl_type *gbl;
struct param_type *param;
-uint32_t curr_shadow_reg;
static void set_failing_group_stage(uint32_t group, uint32_t stage,
uint32_t substage)
param->write_correct_mask_vg = (1 << ratio) - 1;
param->read_correct_mask = (1 << RW_MGR_MEM_DQ_PER_READ_DQS) - 1;
param->write_correct_mask = (1 << RW_MGR_MEM_DQ_PER_WRITE_DQS) - 1;
- ratio = RW_MGR_MEM_DATA_WIDTH /
- RW_MGR_MEM_DATA_MASK_WIDTH;
- param->dm_correct_mask = (1 << ratio) - 1;
}
/**
u32 r;
for (r = 0; r < RW_MGR_MEM_NUMBER_OF_RANKS; r++) {
- if (param->skip_ranks[r]) {
- /* request to skip the rank */
- continue;
- }
-
/* set rank */
set_rank_and_odt_mask(r, RW_MGR_ODT_MODE_OFF);
*bit_chk = param->write_correct_mask;
for (r = rank_bgn; r < rank_end; r++) {
- /* Request to skip the rank */
- if (param->skip_ranks[r])
- continue;
-
/* Set rank */
set_rank_and_odt_mask(r, RW_MGR_ODT_MODE_READ_WRITE);
bit_chk = param->read_correct_mask;
for (r = rank_bgn; r < rank_end; r++) {
- /* Request to skip the rank */
- if (param->skip_ranks[r])
- continue;
-
/* Set rank */
set_rank_and_odt_mask(r, RW_MGR_ODT_MODE_READ_WRITE);
debug("%s:%d\n", __func__, __LINE__);
for (r = rank_bgn; r < rank_end; r++) {
- if (param->skip_ranks[r])
- /* request to skip the rank */
- continue;
-
/* set rank */
set_rank_and_odt_mask(r, RW_MGR_ODT_MODE_READ_WRITE);
*bit_chk = param->read_correct_mask;
for (r = rank_bgn; r < rank_end; r++) {
- if (param->skip_ranks[r])
- /* request to skip the rank */
- continue;
-
/* set rank */
set_rank_and_odt_mask(r, RW_MGR_ODT_MODE_READ_WRITE);
for (rank_bgn = 0, sr = 0;
rank_bgn < RW_MGR_MEM_NUMBER_OF_RANKS;
rank_bgn += NUM_RANKS_PER_SHADOW_REG, sr++) {
- /* Check if this set of ranks should be skipped entirely. */
- if (param->skip_shadow_regs[sr])
- continue;
-
ret = rw_mgr_mem_calibrate_vfifo_center(rank_bgn, rw_group,
test_bgn,
use_read_test,
int r;
for (r = 0; r < RW_MGR_MEM_NUMBER_OF_RANKS; r++) {
- /* Test if the rank should be skipped. */
- if (param->skip_ranks[r])
- continue;
-
/* Set rank. */
set_rank_and_odt_mask(r, RW_MGR_ODT_MODE_OFF);
*/
scc_mgr_zero_all();
- run_groups = ~param->skip_groups;
+ run_groups = ~0;
for (write_group = 0, write_test_bgn = 0; write_group
< RW_MGR_MEM_IF_WRITE_DQS_WIDTH; write_group++,
if (STATIC_CALIB_STEPS & CALIB_SKIP_DELAY_SWEEPS)
continue;
- /*
- * Determine if this set of ranks
- * should be skipped entirely.
- */
- if (param->skip_shadow_regs[sr])
- continue;
-
/* Calibrate WRITEs */
if (!rw_mgr_mem_calibrate_writes(rank_bgn,
write_group, write_test_bgn))
if (STATIC_CALIB_STEPS & CALIB_SKIP_LFIFO)
continue;
- /*
- * If we're skipping groups as part of debug,
- * don't calibrate LFIFO.
- */
- if (param->skip_groups != 0)
- continue;
-
/* Calibrate the LFIFO */
if (!rw_mgr_mem_calibrate_lfifo())
return 0;
#define CAL_SUBSTAGE_READ_LATENCY 1
#define CAL_SUBSTAGE_REFRESH 1
-#define MAX_RANKS (RW_MGR_MEM_NUMBER_OF_RANKS)
-#define MAX_DQS (RW_MGR_MEM_IF_WRITE_DQS_WIDTH > \
- RW_MGR_MEM_IF_READ_DQS_WIDTH ? \
- RW_MGR_MEM_IF_WRITE_DQS_WIDTH : \
- RW_MGR_MEM_IF_READ_DQS_WIDTH)
-#define MAX_DQ (RW_MGR_MEM_DATA_WIDTH)
-#define MAX_DM (RW_MGR_MEM_DATA_MASK_WIDTH)
-
/* length of VFIFO, from SW_MACROS */
#define VFIFO_SIZE (READ_VALID_FIFO_SIZE)
/* parameter variable holder */
struct param_type {
- uint32_t dm_correct_mask;
- uint32_t read_correct_mask;
- uint32_t read_correct_mask_vg;
- uint32_t write_correct_mask;
- uint32_t write_correct_mask_vg;
-
- /* set a particular entry to 1 if we need to skip a particular rank */
-
- uint32_t skip_ranks[MAX_RANKS];
-
- /* set a particular entry to 1 if we need to skip a particular group */
-
- uint32_t skip_groups;
-
- /* set a particular entry to 1 if the shadow register
- (which represents a set of ranks) needs to be skipped */
-
- uint32_t skip_shadow_regs[NUM_SHADOW_REGS];
-
+ u32 read_correct_mask;
+ u32 read_correct_mask_vg;
+ u32 write_correct_mask;
+ u32 write_correct_mask_vg;
};