Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wr-switch-sw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
white-rabbit
wr-switch-sw
Commits
da34c2ff
Commit
da34c2ff
authored
Apr 25, 2012
by
Tomasz Wlostowski
Committed by
Alessandro Rubini
Jul 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rt: added CHAN_SHIFTING RPC flag
parent
3b49bc83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
rt_ipc.c
rt/ipc/rt_ipc.c
+6
-2
rt_ipc.h
rt/ipc/rt_ipc.h
+2
-0
No files found.
rt/ipc/rt_ipc.c
View file @
da34c2ff
...
...
@@ -36,7 +36,7 @@ static void clear_state()
/* Sets the phase setpoint on a given channel */
int
rts_adjust_phase
(
int
channel
,
int32_t
phase_setpoint
)
{
TRACE
(
"Adjusting phase: ref channel %d, setpoint=%d ps.
\n
"
,
channel
,
phase_setpoint
);
//
TRACE("Adjusting phase: ref channel %d, setpoint=%d ps.\n", channel, phase_setpoint);
spll_set_phase_shift
(
0
,
phase_setpoint
);
pstate
.
channels
[
channel
].
phase_setpoint
=
phase_setpoint
;
return
0
;
...
...
@@ -119,7 +119,11 @@ void rts_update()
CH
.
flags
=
CHAN_DISABLED
;
else
{
if
(
i
==
pstate
.
current_ref
)
{
spll_get_phase_shift
(
0
,
&
CH
.
phase_current
,
NULL
);
if
(
spll_shifter_busy
(
0
))
CH
.
flags
|=
CHAN_SHIFTING
;
}
if
(
spll_read_ptracker
(
i
,
&
CH
.
phase_loopback
))
CH
.
flags
|=
CHAN_PMEAS_READY
;
}
...
...
@@ -141,7 +145,7 @@ static int rts_get_state_func(const struct minipc_pd *pd, uint32_t *args, void *
struct
rts_pll_state
*
tmp
=
(
struct
rts_pll_state
*
)
ret
;
int
i
;
TRACE
(
"IPC Call: %s [rv at %x]
\n
"
,
__FUNCTION__
,
ret
);
//
TRACE("IPC Call: %s [rv at %x]\n", __FUNCTION__, ret);
/* gaaaah, somebody should write a SWIG plugin for generating this stuff. */
tmp
->
current_ref
=
htonl
(
pstate
.
current_ref
);
...
...
rt/ipc/rt_ipc.h
View file @
da34c2ff
...
...
@@ -16,6 +16,8 @@
#define CHAN_PMEAS_READY (1<<3)
/* Channel not available/disabled */
#define CHAN_DISABLED (1<<4)
/* Channel is busy adjusting phase */
#define CHAN_SHIFTING (1<<5)
/* DMTD clock is present */
#define RTS_DMTD_LOCKED (1<<0)
...
...
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