Commit d3d2825b authored by Federico Vaga's avatar Federico Vaga

core: add internal trigger test mode parameter

add as  module parameter in order to avoid user to enable it during
normal usage
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 9a96238d
......@@ -29,6 +29,9 @@ MODULE_PARM_DESC(show_sdb, "Print a dump of the gateware's SDB tree.");
static int fa_enable_test_data = 0;
module_param_named(enable_test_data, fa_enable_test_data, int, 0444);
static int fa_internal_trig_test = 0;
module_param_named(internal_trig_test, fa_internal_trig_test, int, 0444);
static const int zfad_hw_range[] = {
[ZFA_RANGE_10V] = 0x45,
[ZFA_RANGE_1V] = 0x11,
......@@ -353,6 +356,10 @@ static int __fa_init(struct fa_dev *fa)
/* Set test data register */
fa_writel(fa, fa->fa_adc_csr_base, &zfad_regs[ZFA_CTL_TEST_DATA_EN],
fa_enable_test_data);
/* Set internal trigger test mode */
fa_writel(fa, fa->fa_adc_csr_base, &zfad_regs[ZFAT_CFG_TEST_EN],
fa_internal_trig_test);
/* Set to single shot mode by default */
fa_writel(fa, fa->fa_adc_csr_base, &zfad_regs[ZFAT_SHOTS_NB], 1);
if (zdev->cset->ti->cset->trig == &zfat_type) {
......
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