Commit be151bea authored by Lucas Russo's avatar Lucas Russo

sm_io/*/acq/sm_io_acq_exp.c: fix acq channel override

As we now have, in the same register, two fields,
acha_chan and acq_dtrig_chan, we must modify only the
bits associated with that field. Previously, when
we set the acquisition channel, we were rewriting the
whole register, effectively selection channel 0 for
the acq_dtrig_chan field.
parent 2dcd5f9d
......@@ -199,7 +199,10 @@ static int _acq_data_acquire (void *owner, void *args, void *ret)
smio_thsafe_client_write_32 (self, ACQ_CORE_REG_DDR3_END_ADDR, &end_addr);
/* Prepare acquisition channel control */
uint32_t acq_chan_ctl = ACQ_CORE_ACQ_CHAN_CTL_WHICH_W(chan);
uint32_t acq_chan_ctl = 0;
smio_thsafe_client_read_32 (self, ACQ_CORE_REG_ACQ_CHAN_CTL, &acq_chan_ctl);
acq_chan_ctl = (acq_chan_ctl & ~ACQ_CORE_ACQ_CHAN_CTL_WHICH_MASK) |
ACQ_CORE_ACQ_CHAN_CTL_WHICH_W(chan);
DBE_DEBUG (DBG_SM_IO | DBG_LVL_TRACE, "[sm_io:acq] data_acquire: "
"Channel control register is: 0x%08x\n",
acq_chan_ctl);
......
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