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
dfc26382
Commit
dfc26382
authored
May 04, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added FD_CMD_WR_QUERY, the lib frontend and docs
parent
0ae3f51f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
2 deletions
+72
-2
fine-delay.in
doc/fine-delay.in
+55
-0
fd-zio.c
fd-zio.c
+7
-2
fdelay-init.c
lib/fdelay-init.c
+9
-0
fdelay-lib.h
lib/fdelay-lib.h
+1
-0
No files found.
doc/fine-delay.in
View file @
dfc26382
...
...
@@ -457,6 +457,37 @@ are enumerated in @code{fine-delay.h}
* Writing Board Time::
@end menu
@c --------------------------------------------------------------------------
@node List of Commands to the Device
@subsection List of Commands to the Device
The following commands are currently supported for the @code{command}
write-only file in @i{sysfs}:
@table @code
@item 0 = FD_CMD_HOST_TIME
Set board time equal to host time.
@item 1 = FD_CMD_WR_ENABLE
Enable White-Rabbit mode.
@item 2 = FD_CMD_WR_DISABLE
Disable White-Rabbit mode.
@item 3 = FD_CMD_WR_QUERY
Tell the user the status of White-Rabbit mode. This is a hack, as
the return value is reported using error codes. Success means
White-Rabbit is synchronized. @code{ENODEV} means there is
WR mode activa, @code{EAGAIN} means it is not synchronized yet.
The error is returned to the @i{write} system call.
@end table
@c --------------------------------------------------------------------------
@node Reading Board Time
@subsection Reading Board Time
...
...
@@ -1041,6 +1072,30 @@ The API is not implemented, nor the example programs. The header,
however, includes a tentative API, based on structures. Please check
the header and @i{lib/fdelay-output.c} until it is ready.
@c ==========================================================================
@node White-Rabbit Configuration
@section White-Rabbit Configuration
@b{Note:} these functions have not been tested yet, although the low-level
command works.
The following functions are offered
@table @code
@item int fdelay_wr_mode(struct fdelay_board *b, int on);
The function receives 0 to disable WR mode or non-0 to enable it.
It is expected to never fail if the driver is loaded.
@item int fdelay_check_wr_mode(struct fdelay_board *b);
The function returns 0 if the WR slave is synchronized, @code{EAGAIN}
(an integer) if it is enabled by not yet synchronized and @code{ENODEV}
if WR-mode is currently disabled.
@end table
@c ##########################################################################
@node Known Bugs and Missing Features
@chapter Known Bugs and Missing Features
...
...
fd-zio.c
View file @
dfc26382
...
...
@@ -130,8 +130,13 @@ static int fd_wr_mode(struct spec_fd *fd, int on)
static
int
fd_wr_query
(
struct
spec_fd
*
fd
)
{
/* To be filled */
return
-
EOPNOTSUPP
;
int
ena
=
test_bit
(
FD_FLAG_WR_MODE
,
&
fd
->
flags
);
if
(
!
ena
)
return
-
ENODEV
;
if
(
fd_readl
(
fd
,
FD_REG_TCR
)
&
FD_TCR_WR_LOCKED
)
return
0
;
return
-
EAGAIN
;
}
...
...
lib/fdelay-init.c
View file @
dfc26382
...
...
@@ -189,3 +189,12 @@ int fdelay_wr_mode(struct fdelay_board *userb, int on)
else
return
__fdelay_command
(
b
,
FD_CMD_WR_DISABLE
);
}
extern
int
fdelay_check_wr_mode
(
struct
fdelay_board
*
userb
)
{
__define_board
(
b
,
userb
);
if
(
__fdelay_command
(
b
,
FD_CMD_WR_ENABLE
)
==
0
)
return
0
;
return
errno
;
}
lib/fdelay-lib.h
View file @
dfc26382
...
...
@@ -77,6 +77,7 @@ extern int fdelay_config_pulse_ps(struct fdelay_board *b,
int
channel
,
struct
fdelay_pulse_ps
*
ps
);
extern
int
fdelay_wr_mode
(
struct
fdelay_board
*
b
,
int
on
);
extern
int
fdelay_check_wr_mode
(
struct
fdelay_board
*
b
);
#ifdef FDELAY_INTERNAL
/* Libray users should ignore what follows */
...
...
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