Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC ADC 100M 14b 4cha
Commits
95471194
Commit
95471194
authored
Jul 06, 2021
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw: check hardware for invalid acquisiton before starting
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
ea4ad850
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
+11
-0
fa-regtable.c
software/kernel/fa-regtable.c
+1
-0
fa-zio-trg.c
software/kernel/fa-zio-trg.c
+9
-0
fmc-adc-100m14b4cha-private.h
software/kernel/fmc-adc-100m14b4cha-private.h
+1
-0
No files found.
software/kernel/fa-regtable.c
View file @
95471194
...
...
@@ -24,6 +24,7 @@ const struct zfa_field_desc zfad_regs[] = {
[
ZFA_STA_FSM
]
=
{
ADC_CSR_STA_REG_OFFSET
,
0x00000007
,
1
},
[
ZFA_STA_SERDES_PLL
]
=
{
ADC_CSR_STA_REG_OFFSET
,
0x00000008
,
1
},
[
ZFA_STA_SERDES_SYNCED
]
=
{
ADC_CSR_STA_REG_OFFSET
,
0x00000010
,
1
},
[
ZFA_STA_ACQ_CFG
]
=
{
ADC_CSR_STA_REG_OFFSET
,
0x00000020
,
1
},
[
ZFA_STA_FMC_NR
]
=
{
ADC_CSR_STA_REG_OFFSET
,
0x000000c0
,
1
},
[
ZFA_STA_CALIB_BUSY
]
=
{
ADC_CSR_STA_REG_OFFSET
,
0x00008000
,
1
},
/* Trigger */
...
...
software/kernel/fa-zio-trg.c
View file @
95471194
...
...
@@ -317,6 +317,11 @@ static int zfat_data_done(struct zio_cset *cset)
return
0
;
}
static
bool
fa_adc_is_acquisition_valid
(
struct
fa_dev
*
fa
)
{
return
fa_readl
(
fa
,
fa
->
fa_adc_csr_base
,
&
zfad_regs
[
ZFA_STA_ACQ_CFG
]);
}
/*
* zfat_arm_trigger
* @ti: trigger instance
...
...
@@ -335,6 +340,10 @@ static int zfat_arm_trigger(struct zio_ti *ti)
int
i
,
err
=
0
;
dev_dbg
(
fa
->
msgdev
,
"Arming trigger
\n
"
);
if
(
!
fa_adc_is_acquisition_valid
(
fa
))
{
dev_err
(
fa
->
msgdev
,
"Hardware detected invalid ADC acquistion
\n
"
);
return
-
EINVAL
;
}
/* Update the current control: sequence, nsamples and tstamp */
interleave
->
current_ctrl
->
nsamples
=
ti
->
nsamples
;
...
...
software/kernel/fmc-adc-100m14b4cha-private.h
View file @
95471194
...
...
@@ -91,6 +91,7 @@ enum zfadc_dregs_enum {
ZFA_STA_FSM
,
ZFA_STA_SERDES_PLL
,
ZFA_STA_SERDES_SYNCED
,
ZFA_STA_ACQ_CFG
,
ZFA_STA_FMC_NR
,
ZFA_STA_CALIB_BUSY
,
/* Configuration register */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment