Commit 1c5873ff authored by Tomasz Wlostowski's avatar Tomasz Wlostowski Committed by Alessandro Rubini

softpll: VERY UGLY slave mode fix (helper should use RX clock instead of REF…

softpll: VERY UGLY slave mode fix (helper should use RX clock instead of REF clock in slave mode...)
parent fcaf3bed
......@@ -92,9 +92,7 @@ static inline void start_ptrackers(struct softpll_state *s)
static inline void update_ptrackers(struct softpll_state *s, int tag_value, int tag_source)
{
ptracker_mask |= (1<<spll_n_chan_ref);
if(tag_source >= spll_n_chan_ref)
if(tag_source > spll_n_chan_ref)
return;
ptrackers_update(s->ptrackers, tag_value, tag_source);
......@@ -342,8 +340,14 @@ void spll_init(int mode, int slave_ref_channel, int align_pps)
else
s->seq_state = SEQ_CLEAR_DACS;
int helper_ref;
if( mode == SPLL_MODE_SLAVE)
helper_ref = slave_ref_channel; // Slave mode: lock the helper to an uplink port
else
helper_ref = spll_n_chan_ref; // Master/GM mode: lock the helper to the local ref clock
helper_init(&s->helper, spll_n_chan_ref);
helper_init(&s->helper, helper_ref);
mpll_init(&s->mpll, slave_ref_channel, spll_n_chan_ref);
for (i = 0; i < spll_n_chan_out - 1; i++) {
......
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