Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha - Software
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 DEL 1ns 4cha - Software
Commits
969d9fec
Commit
969d9fec
authored
May 15, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fd-zio: fix corruption of local copy of flags
parent
1ad18b77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
fd-zio.c
fd-zio.c
+5
-5
fine-delay.h
fine-delay.h
+1
-0
No files found.
fd-zio.c
View file @
969d9fec
...
...
@@ -234,7 +234,7 @@ static int fd_zio_conf_tdc(struct device *dev, struct zio_attribute *zattr,
}
/* This code is only about FD_ATTR_TDC_FLAGS */
change
=
zattr
->
value
^
usr_val
;
/* old xor new */
change
=
fd
->
calib
.
tdc_flags
^
usr_val
;
/* old xor new */
/* No need to lock, as configuration is serialized by zio-core */
if
(
change
&
FD_TDCF_DISABLE_INPUT
)
{
...
...
@@ -262,8 +262,8 @@ static int fd_zio_conf_tdc(struct device *dev, struct zio_attribute *zattr,
fd_gpio_clr
(
fd
,
FD_GPIO_TERM_EN
);
}
out:
/* We need to store in the
other
array too (see info_tdc() above) */
fd
->
tdc_attrs
[
FD_CSET_INDEX
(
zattr
->
priv
.
addr
)]
=
usr_val
;
/* We need to store in the
local
array too (see info_tdc() above) */
fd
->
calib
.
tdc_flags
=
usr_val
;
return
0
;
}
...
...
@@ -463,9 +463,9 @@ static int fd_read_fifo(struct spec_fd *fd, struct zio_channel *chan)
v
[
FD_ATTR_TDC_FRAC
]
=
t
.
frac
;
v
[
FD_ATTR_TDC_SEQ
]
=
t
.
seq_id
;
v
[
FD_ATTR_TDC_CHAN
]
=
t
.
channel
;
v
[
FD_ATTR_TDC_FLAGS
]
=
fd
->
calib
.
tdc_flags
;
v
[
FD_ATTR_TDC_OFFSET
]
=
fd
->
calib
.
tdc_zero_offset
;
v
[
FD_ATTR_TDC_USER_OFF
]
=
fd
->
calib
.
tdc_user_offset
;
__fd_apply_offset
(
v
+
FD_ATTR_TDC_UTC_H
,
fd
->
calib
.
tdc_user_offset
);
...
...
fine-delay.h
View file @
969d9fec
...
...
@@ -111,6 +111,7 @@ struct fd_calib {
/* The user can add a signed offset, in picoseconds */
int32_t
tdc_user_offset
;
int32_t
ch_user_offset
[
4
];
int32_t
tdc_flags
;
};
/* Channels are called 1..4 in all docs. Internally it's 0..3 */
...
...
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