Commit d3a42ba2 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski Committed by Juan David González Cobas

kernel/fd-zio.c: allow 1 to 16 pulse trains in delay mode too

Signed-off-by: Juan David González Cobas's avatarJuan David Gonzalez Cobas <dcobas@cern.ch>
parent 06842153
......@@ -442,6 +442,9 @@ static void __fd_zio_output(struct fd_dev *fd, int index1_4, uint32_t *attrs)
}
if (mode == FD_OUT_MODE_DELAY) {
if(rep < 0 || rep > 16) /* delay mode allows trains of 1 to 16 pulses. */
return;
/* check delay lower limits. FIXME: raise an alarm */
delay.tv_sec = attrs[FD_ATTR_OUT_START_L];
delay.tv_nsec = attrs[FD_ATTR_OUT_START_COARSE] * 8;
......@@ -484,7 +487,6 @@ static void __fd_zio_output(struct fd_dev *fd, int index1_4, uint32_t *attrs)
if (mode == FD_OUT_MODE_DELAY) {
dcr = 0;
rep = 1; /* ignore repetition in delay mode */
fd_ch_writel(fd, ch, FD_RCR_REP_CNT_W(rep - 1)
| (rep < 0 ? FD_RCR_CONT : 0), FD_REG_RCR);
} 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