Commit 3a8a8a4f authored by Benoit Rat's avatar Benoit Rat Committed by Jean-Claude BAU

arch-wrs: get hw specification from hal shmem instead of define

For security we still use define in the case that the hal as not
properly set these value.
parent 6c8dd4fc
......@@ -86,3 +86,6 @@ int wrs_get_timing_mode_state(struct pp_globals *,wrh_timing_mode_pll_state_t *s
int wrs_set_timing_mode(struct pp_globals *,wrh_timing_mode_t tm);
int wrs_update_port_info(struct pp_globals *ppg);
/* Default value if not set by hal */
#define HAL_REF_CLOCK_PERIOD_PS 1600
#define HAL_DEF_T2_PHASE_TRANS 0
......@@ -26,7 +26,7 @@ int wrs_read_calibration_data(struct pp_instance *ppi,int32_t *clock_period, Tim
if ( scaledBitSlide )
*scaledBitSlide=picos_to_interval( (int64_t) p->calib.bitslide_ps);
if(clock_period)
*clock_period = 16000; /* REF_CLOCK_PERIOD_PS */
*clock_period = (p->clock_period)?p->clock_period:HAL_REF_CLOCK_PERIOD_PS; /* REF_CLOCK_PERIOD_PS */
if ( scaledDelayCoefficient )
*scaledDelayCoefficient=(RelativeDifference)(p->calib.sfp.alpha * REL_DIFF_TWO_POW_FRACBITS);
if ( scaledSfpDeltaTx )
......
......@@ -662,8 +662,8 @@ static int wrs_net_init(struct pp_instance *ppi)
* conversions, and what is constant in the HAL becomes
* constant here (ARub)
*/
s->clock_period = 16000; /* REF_CLOCK_PERIOD_PS */
s->phase_transition = 0; /* DEFAULT_T2_PHASE_TRANS */
s->clock_period = (p->clock_period)?p->clock_period:HAL_REF_CLOCK_PERIOD_PS;
s->phase_transition = (p->t2_phase_transition)?p->t2_phase_transition:HAL_DEF_T2_PHASE_TRANS;
s->dmtd_phase = p->phase_val;
s->dmtd_phase_valid = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment