Commit b15bdf98 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski Committed by Grzegorz Daniluk

Update spll_init() calls to accomodate API changes

parent ff12ee24
......@@ -201,7 +201,7 @@ int measure_t24p(uint32_t *value)
while (!ep_link_up(NULL))
timer_delay_ms(100);
spll_init(SPLL_MODE_SLAVE, 0, 1);
spll_init(SPLL_MODE_SLAVE, 0, SPLL_FLAG_USE_LJD);
pp_printf("Locking PLL...\n");
while (!spll_check_lock(0))
timer_delay_ms(100);
......
......@@ -3,7 +3,7 @@
void spll_very_init(void)
{}
void spll_init(int mode, int ref_channel, int align_pps)
void spll_init(int mode, int ref_channel, int flags)
{}
void spll_enable_ptracker(int ref_channel, int enable)
......
......@@ -21,6 +21,8 @@
static struct rts_pll_state pstate;
extern int scb_ljd_present;
static void clear_state(void)
{
int i;
......@@ -71,7 +73,14 @@ int rts_set_mode(int mode)
{
pp_printf("RT: Setting mode to %s.\n", options[i].desc);
if(options[i].do_init)
spll_init(options[i].mode_spll, 0, 1);
{
uint32_t flags = SPLL_FLAG_ALIGN_PPS;
if( scb_ljd_present )
flags |= SPLL_FLAG_USE_LJD;
spll_init(options[i].mode_spll, 0, flags);
}
else
spll_init(SPLL_MODE_DISABLED, 0, 0);
}
......
......@@ -133,7 +133,7 @@ static int wrc_check_link(void)
wrc_ptp_stop();
rv = 1;
/* special case */
spll_init(SPLL_MODE_FREE_RUNNING_MASTER, 0, 1);
spll_init(SPLL_MODE_FREE_RUNNING_MASTER, 0, SPLL_FLAG_ALIGN_PPS);
shw_pps_gen_enable_output(0);
} else
......
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