Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
PPSi
Commits
6c5ca924
Commit
6c5ca924
authored
Sep 22, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arch-wrpc: use class 68 when WR master
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
e946e9c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
wrc_ptp_ppsi.c
arch-wrpc/wrc_ptp_ppsi.c
+7
-0
constants.h
include/ppsi/constants.h
+1
-0
No files found.
arch-wrpc/wrc_ptp_ppsi.c
View file @
6c5ca924
...
...
@@ -82,6 +82,10 @@ int wrc_ptp_set_mode(int mode)
{
uint32_t
start_tics
,
lock_timeout
=
0
;
struct
pp_instance
*
ppi
=
&
ppi_static
;
typeof
(
default_rt_opts
.
clock_quality
.
clockClass
)
*
class_ptr
;
/* We need to change the class in the default options */
class_ptr
=
&
default_rt_opts
.
clock_quality
.
clockClass
;
ptp_mode
=
0
;
...
...
@@ -93,6 +97,7 @@ int wrc_ptp_set_mode(int mode)
WR_DSPOR
(
ppi
)
->
wrConfig
=
WR_M_ONLY
;
ppi
->
master_only
=
TRUE
;
ppi
->
slave_only
=
FALSE
;
*
class_ptr
=
PP_WRMASTER_CLOCK_CLASS
;
spll_init
(
SPLL_MODE_GRAND_MASTER
,
0
,
1
);
lock_timeout
=
LOCK_TIMEOUT_GM
;
break
;
...
...
@@ -102,6 +107,7 @@ int wrc_ptp_set_mode(int mode)
WR_DSPOR
(
ppi
)
->
wrConfig
=
WR_M_ONLY
;
ppi
->
master_only
=
TRUE
;
ppi
->
slave_only
=
FALSE
;
*
class_ptr
=
PP_WRMASTER_CLOCK_CLASS
;
spll_init
(
SPLL_MODE_FREE_RUNNING_MASTER
,
0
,
1
);
lock_timeout
=
LOCK_TIMEOUT_FM
;
break
;
...
...
@@ -111,6 +117,7 @@ int wrc_ptp_set_mode(int mode)
WR_DSPOR
(
ppi
)
->
wrConfig
=
WR_S_ONLY
;
ppi
->
master_only
=
FALSE
;
ppi
->
slave_only
=
TRUE
;
*
class_ptr
=
PP_WRMASTER_CLOCK_CLASS
;
spll_init
(
SPLL_MODE_SLAVE
,
0
,
1
);
break
;
}
...
...
include/ppsi/constants.h
View file @
6c5ca924
...
...
@@ -30,6 +30,7 @@
#define PP_DEFAULT_SYNC_RECEIPT_TIMEOUT 3
#define PP_DEFAULT_ANNOUNCE_RECEIPT_TIMEOUT 6
/* 3 by default */
#define PP_DEFAULT_CLOCK_CLASS 187
#define PP_WRMASTER_CLOCK_CLASS 68
/* WR is better */
#define PP_DEFAULT_CLOCK_ACCURACY 0xFE
#define PP_DEFAULT_PRIORITY1 128
#define PP_DEFAULT_PRIORITY2 128
...
...
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