Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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 - Software
Commits
d693d912
Commit
d693d912
authored
Aug 13, 2019
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drv:trg: fix access to timetag register
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
a0df7a4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
fa-zio-trg.c
kernel/fa-zio-trg.c
+12
-2
No files found.
kernel/fa-zio-trg.c
View file @
d693d912
...
...
@@ -125,8 +125,13 @@ static int zfat_conf_set(struct device *dev, struct zio_attribute *zattr,
{
struct
fa_dev
*
fa
=
get_zfadc
(
dev
);
struct
zio_ti
*
ti
=
to_zio_ti
(
dev
);
void
*
baseoff
=
fa
->
fa_adc_csr_base
;
uint32_t
tmp_val
=
usr_val
;
if
(
zattr
->
id
>=
ZFA_UTC_SECONDS_U
&&
zattr
->
id
<=
ZFA_UTC_ACQ_END_COARSE
)
baseoff
=
fa
->
fa_utc_base
;
switch
(
zattr
->
id
)
{
case
ZFAT_SHOTS_NB
:
if
(
!
tmp_val
)
{
...
...
@@ -171,7 +176,7 @@ static int zfat_conf_set(struct device *dev, struct zio_attribute *zattr,
return
0
;
}
fa_writel
(
fa
,
fa
->
fa_adc_csr_base
,
&
zfad_regs
[
zattr
->
id
],
tmp_val
);
fa_writel
(
fa
,
baseoff
,
&
zfad_regs
[
zattr
->
id
],
tmp_val
);
return
0
;
}
...
...
@@ -184,6 +189,11 @@ static int zfat_info_get(struct device *dev, struct zio_attribute *zattr,
uint32_t
*
usr_val
)
{
struct
fa_dev
*
fa
=
get_zfadc
(
dev
);
void
*
baseoff
=
fa
->
fa_adc_csr_base
;
if
(
zattr
->
id
>=
ZFA_UTC_SECONDS_U
&&
zattr
->
id
<=
ZFA_UTC_ACQ_END_COARSE
)
baseoff
=
fa
->
fa_utc_base
;
switch
(
zattr
->
id
)
{
case
ZFAT_CFG_SRC
:
...
...
@@ -194,7 +204,7 @@ static int zfat_info_get(struct device *dev, struct zio_attribute *zattr,
return
0
;
}
*
usr_val
=
fa_readl
(
fa
,
fa
->
fa_adc_csr_base
,
&
zfad_regs
[
zattr
->
id
]);
*
usr_val
=
fa_readl
(
fa
,
baseoff
,
&
zfad_regs
[
zattr
->
id
]);
switch
(
zattr
->
id
)
{
case
ZFAT_POST
:
(
*
usr_val
)
++
;
/* add the trigger sample */
...
...
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