Commit 144a8bcf authored by Federico Vaga's avatar Federico Vaga

kernel: add global time stamp counter

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 5d66f6d1
......@@ -112,6 +112,7 @@ struct ft_wr_timestamp {
uint32_t coarse;
uint32_t frac;
int seq_id;
int gseq_id;
int channel;
};
......@@ -163,6 +164,8 @@ struct fmctdc_dev {
int wr_mode;
/* hardware buffer pointers / dacapo regs */
uint32_t cur_wr_ptr, prev_wr_ptr;
uint64_t sequence; /**< Board time-stamp sequence number */
};
extern struct ft_carrier_specific ft_carrier_spec;
......
......@@ -289,6 +289,7 @@ int ft_probe(struct fmc_device *fmc)
ft_enable_acquisition(ft, 1);
ft->initialized = 1;
ft->sequence = 0;
return 0;
err:
......
......@@ -179,11 +179,11 @@ static inline void process_timestamp(struct fmctdc_dev *ft,
if (st->user_offset)
ft_ts_apply_offset(&ts, st->user_offset);
ts.gseq_id = ft->sequence++;
/* Got a dacapo flag? make a gap in the sequence ID to indicate
an unknown loss of timestamps */
ts.seq_id = st->cur_seq_id++;
if (dacapo_flag) {
ts.seq_id++;
st->cur_seq_id++;
......
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