Commit e3f785e2 authored by Dimitris Lampridis's avatar Dimitris Lampridis

fw/common: init the WR link state after every start/restart

parent 27cd661f
...@@ -216,7 +216,7 @@ static void ts_now(struct wrtd_tstamp *now) ...@@ -216,7 +216,7 @@ static void ts_now(struct wrtd_tstamp *now)
{ {
/* /*
* Read the current WR time, order is important: first seconds, * Read the current WR time, order is important: first seconds,
* then cycles (cycles get latched on reading secs register. * then cycles (cycles get latched on reading secs register).
*/ */
now->seconds = lr_readl(MT_CPU_LR_REG_TAI_SEC); now->seconds = lr_readl(MT_CPU_LR_REG_TAI_SEC);
now->ns = lr_readl(MT_CPU_LR_REG_TAI_CYCLES) * 8; now->ns = lr_readl(MT_CPU_LR_REG_TAI_CYCLES) * 8;
...@@ -661,6 +661,7 @@ static int wrtd_sys_init(void) ...@@ -661,6 +661,7 @@ static int wrtd_sys_init(void)
#if WRTD_NET_TX > 0 #if WRTD_NET_TX > 0
wrtd_init_tx(); wrtd_init_tx();
#endif #endif
root.wr_state = WR_LINK_OFFLINE;
return wrtd_user_init(); return wrtd_user_init();
} }
......
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