Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
ptp-noposix
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
ppsi
ptp-noposix
Commits
b426591a
Commit
b426591a
authored
Jul 26, 2012
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
softpll: there is no TRACE macro in ptp-noposix, change it to TRACE_DEV
parent
b1c90ee8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
softpll_ng.c
softpll/softpll_ng.c
+10
-10
No files found.
softpll/softpll_ng.c
View file @
b426591a
...
...
@@ -315,7 +315,7 @@ void spll_init(int mode, int slave_ref_channel, int align_pps)
ptracker_init
(
&
softpll
.
ptrackers
[
i
],
n_chan_ref
,
i
,
PTRACKER_AVERAGE_SAMPLES
);
TRACE
(
"SPLL_Init: running as %s, %d ref channels, %d out channels
\n
"
,
mode_str
,
n_chan_ref
,
n_chan_out
);
TRACE
_DEV
(
"SPLL_Init: running as %s, %d ref channels, %d out channels
\n
"
,
mode_str
,
n_chan_ref
,
n_chan_out
);
/* Purge tag buffer */
while
(
!
(
SPLL
->
TRR_CSR
&
SPLL_TRR_CSR_EMPTY
))
dummy
=
SPLL
->
TRR_R0
;
...
...
@@ -352,7 +352,7 @@ void spll_start_channel(int channel)
{
if
(
softpll
.
seq_state
!=
SEQ_READY
||
!
channel
)
{
TRACE
(
"Can't start channel %d, the PLL is not ready
\n
"
,
channel
);
TRACE
_DEV
(
"Can't start channel %d, the PLL is not ready
\n
"
,
channel
);
return
;
}
mpll_start
(
&
softpll
.
aux
[
channel
-
1
]);
...
...
@@ -442,7 +442,7 @@ void spll_get_num_channels(int *n_ref, int *n_out)
void
spll_show_stats
()
{
if
(
softpll
.
mode
>
0
)
TRACE
(
"Irq_count %d Sequencer_state %d mode %d Alignment_state %d HL%d EL%d ML%d HY=%d MY=%d DelCnt=%d
\n
"
,
TRACE
_DEV
(
"Irq_count %d Sequencer_state %d mode %d Alignment_state %d HL%d EL%d ML%d HY=%d MY=%d DelCnt=%d
\n
"
,
irq_count
,
softpll
.
seq_state
,
softpll
.
mode
,
softpll
.
ext
.
realign_state
,
softpll
.
helper
.
ld
.
locked
,
softpll
.
ext
.
ld
.
locked
,
softpll
.
mpll
.
ld
.
locked
,
softpll
.
helper
.
pi
.
y
,
softpll
.
mpll
.
pi
.
y
,
softpll
.
delock_count
);
...
...
@@ -463,13 +463,13 @@ void spll_enable_ptracker(int ref_channel, int enable)
spll_enable_tagger
(
ref_channel
,
1
);
ptracker_start
((
struct
spll_ptracker_state
*
)
&
softpll
.
ptrackers
[
ref_channel
]);
ptracker_mask
|=
(
1
<<
ref_channel
);
TRACE
(
"Enabling ptracker channel: %d
\n
"
,
ref_channel
);
TRACE
_DEV
(
"Enabling ptracker channel: %d
\n
"
,
ref_channel
);
}
else
{
ptracker_mask
&=
~
(
1
<<
ref_channel
);
if
(
ref_channel
!=
softpll
.
mpll
.
id_ref
)
spll_enable_tagger
(
ref_channel
,
0
);
TRACE
(
"Disabling ptracker tagger: %d
\n
"
,
ref_channel
);
TRACE
_DEV
(
"Disabling ptracker tagger: %d
\n
"
,
ref_channel
);
}
}
...
...
@@ -490,7 +490,7 @@ int spll_update_aux_clocks()
if
((
!
(
occr_aux_en
&
(
1
<<
(
i
+
1
)))
&&
s
->
state
!=
AUX_DISABLED
))
{
TRACE
(
"[aux] disabled channel %d
\n
"
,
i
);
TRACE
_DEV
(
"[aux] disabled channel %d
\n
"
,
i
);
spll_stop_channel
(
i
+
1
);
SPLL
->
OCCR
&=
~
(
SPLL_OCCR_OUT_LOCK_W
((
1
<<
(
i
+
1
))));
s
->
state
=
AUX_DISABLED
;
...
...
@@ -500,7 +500,7 @@ int spll_update_aux_clocks()
case
AUX_DISABLED
:
if
(
occr_aux_en
&
(
1
<<
(
i
+
1
))
&&
softpll
.
mpll
.
ld
.
locked
)
{
TRACE
(
"[aux] enabled channel %d
\n
"
,
i
);
TRACE
_DEV
(
"[aux] enabled channel %d
\n
"
,
i
);
s
->
state
=
AUX_LOCK_PLL
;
spll_start_channel
(
i
+
1
);
...
...
@@ -510,7 +510,7 @@ int spll_update_aux_clocks()
case
AUX_LOCK_PLL
:
if
(
softpll
.
aux
[
i
].
ld
.
locked
)
{
TRACE
(
"[aux] channel %d locked [aligning @ %d ps]
\n
"
,
i
,
softpll
.
mpll_shift_ps
);
TRACE
_DEV
(
"[aux] channel %d locked [aligning @ %d ps]
\n
"
,
i
,
softpll
.
mpll_shift_ps
);
set_phase_shift
(
i
+
1
,
softpll
.
mpll_shift_ps
);
s
->
state
=
AUX_ALIGN_PHASE
;
}
...
...
@@ -520,7 +520,7 @@ int spll_update_aux_clocks()
case
AUX_ALIGN_PHASE
:
if
(
!
mpll_shifter_busy
(
&
softpll
.
aux
[
i
]))
{
TRACE
(
"[aux] channel %d phase aligned
\n
"
,
i
);
TRACE
_DEV
(
"[aux] channel %d phase aligned
\n
"
,
i
);
SPLL
->
OCCR
|=
SPLL_OCCR_OUT_LOCK_W
((
1
<<
(
i
+
1
)));
s
->
state
=
AUX_READY
;
}
...
...
@@ -529,7 +529,7 @@ int spll_update_aux_clocks()
case
AUX_READY
:
if
(
!
softpll
.
mpll
.
ld
.
locked
||
!
softpll
.
aux
[
i
].
ld
.
locked
)
{
TRACE
(
"[aux] aux channel or mpll lost lock
\n
"
);
TRACE
_DEV
(
"[aux] aux channel or mpll lost lock
\n
"
);
SPLL
->
OCCR
&=
~
(
SPLL_OCCR_OUT_LOCK_W
((
1
<<
(
i
+
1
))));
s
->
state
=
AUX_DISABLED
;
}
...
...
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