Commit b54a14a8 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

use REF_CLOCK_PERIOD_PS instead of the hardcoded values

Based on Peter's work for km2net CLB board.
parent 0e8b222a
......@@ -374,7 +374,7 @@ int minic_tx_frame(uint8_t * hdr, uint8_t * payload, uint32_t size,
hwts->valid = ts_valid;
hwts->sec = sec;
hwts->ahead = 0;
hwts->nsec = counter_r * 8;
hwts->nsec = counter_r * (REF_CLOCK_PERIOD_PS / 1000);
// TRACE_DEV("minic_tx_frame [%d bytes] TS: %d.%d valid %d\n", size, hwts->utc, hwts->nsec, hwts->valid);
minic.tx_count++;
......
......@@ -49,7 +49,7 @@ int wrpc_get_port_state(struct hal_port_state *port, const char *port_name)
port->locked = spll_check_lock(0);
/* port->lock_priority = 0;*/
/*spll_get_phase_shift(0, NULL, (int32_t *)&port->phase_setpoint);*/
port->clock_period = 8000;
port->clock_period = REF_CLOCK_PERIOD_PS;
port->t2_phase_transition = cal_phase_transition;
port->t4_phase_transition = cal_phase_transition;
get_mac_addr(port->hw_addr);
......
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