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
7a4696c3
Commit
7a4696c3
authored
Feb 27, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
massive: rename arch-spec to arch-wrpc
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
07ea72f7
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
92 additions
and
92 deletions
+92
-92
MAKEALL
MAKEALL
+6
-6
Makefile
arch-wrpc/Makefile
+7
-7
crt0.S
arch-wrpc/crt0.S
+0
-0
arch.h
arch-wrpc/include/arch/arch.h
+0
-0
constants.h
arch-wrpc/include/arch/constants.h
+0
-0
wrpc-calibration.c
arch-wrpc/wrpc-calibration.c
+14
-14
wrpc-io.c
arch-wrpc/wrpc-io.c
+5
-5
wrpc-socket.c
arch-wrpc/wrpc-socket.c
+12
-12
wrpc-spll.c
arch-wrpc/wrpc-spll.c
+16
-16
wrpc-timer.c
arch-wrpc/wrpc-timer.c
+14
-14
wrpc.h
arch-wrpc/wrpc.h
+15
-15
wrpc.lds
arch-wrpc/wrpc.lds
+0
-0
Documentation
doc/Documentation
+2
-2
wr-api.h
proto-ext-whiterabbit/wr-api.h
+1
-1
No files found.
MAKEALL
View file @
7a4696c3
...
...
@@ -23,7 +23,7 @@ build_diags () {
build_ext
()
{
unset
PROTO_EXT
build_diags
if
[
"
$ARCH
"
=
"
spe
c"
]
;
then
if
[
"
$ARCH
"
=
"
wrp
c"
]
;
then
export
PROTO_EXT
=
whiterabbit
build_diags
fi
...
...
@@ -37,24 +37,24 @@ done
PREFIX_gnu_linux
=
""
PREFIX_bare_i386
=
""
PREFIX_bare_x86_64
=
""
PREFIX_
spe
c
=
"/opt/gcc-lm32/bin/lm32-elf-"
PREFIX_
wrp
c
=
"/opt/gcc-lm32/bin/lm32-elf-"
CC_gnu_linux
=
"gcc"
CC_bare_i386
=
"gcc -m32"
CC_bare_x86_64
=
"gcc -m64"
CC_
spec
=
"
${
PREFIX_spe
c
}
gcc"
CC_
wrpc
=
"
${
PREFIX_wrp
c
}
gcc"
LD_gnu_linux
=
"ld"
LD_bare_i386
=
"ld -m elf_i386"
LD_bare_x86_64
=
"ld -m elf_x86_64"
LD_
spec
=
"
${
PREFIX_spe
c
}
ld"
LD_
wrpc
=
"
${
PREFIX_wrp
c
}
ld"
# Defaults, overridden by command line, later
SHOW_UNDEF
=
false
ARCHS
=
"gnu-linux bare-i386 bare-x86-64"
if
[
"x
${
WRPCSW_ROOT
}
"
!=
"x"
]
;
then
ARCHS
=
"
$ARCHS
spe
c"
ARCHS
=
"
$ARCHS
wrp
c"
fi
# Parse command line, so we can limit the archs we build for
...
...
@@ -66,7 +66,7 @@ while [ $# -gt 0 ]; do
ARCHS
=
"
$1
"
;;
bare-x86-64
)
ARCHS
=
"
$1
"
;;
spe
c
)
wrp
c
)
ARCHS
=
"
$1
"
;;
bare
)
ARCHS
=
"bare-i386 bare-x86-64"
;;
...
...
arch-
spe
c/Makefile
→
arch-
wrp
c/Makefile
View file @
7a4696c3
...
...
@@ -27,11 +27,11 @@ LIBARCH := $A/libarch.a
LIBS
+=
-L
$A
-larch
OBJ-libarch
:=
$A
/
spe
c-socket.o
\
$A
/
spe
c-io.o
\
$A
/
spe
c-timer.o
\
$A
/
spe
c-spll.o
\
$A
/
spe
c-calibration.o
\
OBJ-libarch
:=
$A
/
wrp
c-socket.o
\
$A
/
wrp
c-io.o
\
$A
/
wrp
c-timer.o
\
$A
/
wrp
c-spll.o
\
$A
/
wrp
c-calibration.o
\
lib/div64.o
$(LIBARCH)
:
$(OBJ-libarch)
...
...
@@ -43,9 +43,9 @@ ppsi-bin: $(TARGET) $(TARGET).bin
# to build the target, we need -lstd again, in case we call functions that
# were not selected yet (e.g., pp_open_instance() ).
$(TARGET)
:
$(TARGET).o $A/crt0.o $(LIBARCH) $A/main-loop.o $A/
spe
c-startup.o
$(TARGET)
:
$(TARGET).o $A/crt0.o $(LIBARCH) $A/main-loop.o $A/
wrp
c-startup.o
$(CC)
-Wl
,-Map,
$(TARGET)
.map2
$(ARCH_LDFLAGS)
-o
$@
$A
/crt0.o
\
$(TARGET)
.o
$
(
specdev-objects
)
$A
/main-loop.o
$A
/
spe
c-startup.o
\
$(TARGET)
.o
$
(
specdev-objects
)
$A
/main-loop.o
$A
/
wrp
c-startup.o
\
-L
$A
-larch
$(LIBS)
$(TARGET).bin
:
$(TARGET)
...
...
arch-
spe
c/crt0.S
→
arch-
wrp
c/crt0.S
View file @
7a4696c3
File moved
arch-
spe
c/include/arch/arch.h
→
arch-
wrp
c/include/arch/arch.h
View file @
7a4696c3
File moved
arch-
spe
c/include/arch/constants.h
→
arch-
wrp
c/include/arch/constants.h
View file @
7a4696c3
File moved
arch-
spec/spe
c-calibration.c
→
arch-
wrpc/wrp
c-calibration.c
View file @
7a4696c3
...
...
@@ -5,10 +5,10 @@
#include <endpoint.h>
#include <ppsi/ppsi.h>
#include <softpll_ng.h>
#include "
spe
c.h"
#include "
wrp
c.h"
#include "../proto-ext-whiterabbit/wr-constants.h"
static
int
spe
c_read_calibration_data
(
struct
pp_instance
*
ppi
,
static
int
wrp
c_read_calibration_data
(
struct
pp_instance
*
ppi
,
uint32_t
*
deltaTx
,
uint32_t
*
deltaRx
,
int32_t
*
fix_alpha
,
int32_t
*
clock_period
)
{
...
...
@@ -52,22 +52,22 @@ static int spec_read_calibration_data(struct pp_instance *ppi,
/* Begin of exported functions */
int
spe
c_calibrating_disable
(
struct
pp_instance
*
ppi
,
int
txrx
)
int
wrp
c_calibrating_disable
(
struct
pp_instance
*
ppi
,
int
txrx
)
{
return
WR_HW_CALIB_OK
;
}
int
spe
c_calibrating_enable
(
struct
pp_instance
*
ppi
,
int
txrx
)
int
wrp
c_calibrating_enable
(
struct
pp_instance
*
ppi
,
int
txrx
)
{
return
WR_HW_CALIB_OK
;
}
int
spe
c_calibrating_poll
(
struct
pp_instance
*
ppi
,
int
txrx
,
uint32_t
*
delta
)
int
wrp
c_calibrating_poll
(
struct
pp_instance
*
ppi
,
int
txrx
,
uint32_t
*
delta
)
{
uint32_t
delta_rx
=
0
,
delta_tx
=
0
;
/* FIXME: why delta was 64bit whereas ep_get_deltas accepts 32bit? */
spe
c_read_calibration_data
(
ppi
,
&
delta_tx
,
&
delta_rx
,
NULL
,
NULL
);
wrp
c_read_calibration_data
(
ppi
,
&
delta_tx
,
&
delta_rx
,
NULL
,
NULL
);
if
(
txrx
==
WR_HW_CALIB_TX
)
*
delta
=
delta_tx
;
...
...
@@ -77,7 +77,7 @@ int spec_calibrating_poll(struct pp_instance *ppi, int txrx, uint32_t *delta)
return
WR_HW_CALIB_READY
;
}
int
spe
c_calibration_pattern_enable
(
struct
pp_instance
*
ppi
,
int
wrp
c_calibration_pattern_enable
(
struct
pp_instance
*
ppi
,
unsigned
int
calibrationPeriod
,
unsigned
int
calibrationPattern
,
unsigned
int
calibrationPatternLen
)
...
...
@@ -86,30 +86,30 @@ int spec_calibration_pattern_enable(struct pp_instance *ppi,
return
WR_HW_CALIB_OK
;
}
int
spe
c_calibration_pattern_disable
(
struct
pp_instance
*
ppi
)
int
wrp
c_calibration_pattern_disable
(
struct
pp_instance
*
ppi
)
{
ep_cal_pattern_disable
();
return
WR_HW_CALIB_OK
;
}
int
wr_calibrating_disable
(
struct
pp_instance
*
ppi
,
int
txrx
)
__attribute__
((
alias
(
"
spe
c_calibrating_disable"
)));
__attribute__
((
alias
(
"
wrp
c_calibrating_disable"
)));
int
wr_calibrating_enable
(
struct
pp_instance
*
ppi
,
int
txrx
)
__attribute__
((
alias
(
"
spe
c_calibrating_enable"
)));
__attribute__
((
alias
(
"
wrp
c_calibrating_enable"
)));
int
wr_calibrating_poll
(
struct
pp_instance
*
ppi
,
int
txrx
,
uint32_t
*
delta
)
__attribute__
((
alias
(
"
spe
c_calibrating_poll"
)));
__attribute__
((
alias
(
"
wrp
c_calibrating_poll"
)));
int
wr_calibration_pattern_enable
(
struct
pp_instance
*
ppi
,
unsigned
int
calibrationPeriod
,
unsigned
int
calibrationPattern
,
unsigned
int
calibrationPatternLen
)
__attribute__
((
alias
(
"
spe
c_calibration_pattern_enable"
)));
__attribute__
((
alias
(
"
wrp
c_calibration_pattern_enable"
)));
int
wr_calibration_pattern_disable
(
struct
pp_instance
*
ppi
)
__attribute__
((
alias
(
"
spe
c_calibration_pattern_disable"
)));
__attribute__
((
alias
(
"
wrp
c_calibration_pattern_disable"
)));
int
wr_read_calibration_data
(
struct
pp_instance
*
ppi
,
uint32_t
*
deltaTx
,
uint32_t
*
deltaRx
,
int32_t
*
fix_alpha
,
int32_t
*
clock_period
)
__attribute__
((
alias
(
"
spe
c_read_calibration_data"
)));
__attribute__
((
alias
(
"
wrp
c_read_calibration_data"
)));
arch-
spec/spe
c-io.c
→
arch-
wrpc/wrp
c-io.c
View file @
7a4696c3
...
...
@@ -4,7 +4,7 @@
#include <ppsi/ppsi.h>
#include <uart.h>
#include <pps_gen.h>
#include "
spe
c.h"
#include "
wrp
c.h"
void
pp_puts
(
const
char
*
s
)
{
...
...
@@ -20,14 +20,14 @@ void pp_get_tstamp(TimeInternal *t) //uint32_t *sptr)
t
->
nanoseconds
=
(
int32_t
)
nsec
;
}
int32_t
spe
c_set_tstamp
(
TimeInternal
*
t
)
int32_t
wrp
c_set_tstamp
(
TimeInternal
*
t
)
{
shw_pps_gen_set_time
(
t
->
seconds
,
t
->
nanoseconds
);
return
0
;
/* SPEC uses a sort of monotonic tstamp for timers */
}
int
spe
c_adj_freq
(
Integer32
adj
)
int
wrp
c_adj_freq
(
Integer32
adj
)
{
/* FIXME: this adjusts nanoseconds, not frequency */
shw_pps_gen_adjust
(
PPSG_ADJUST_NSEC
,
adj
);
...
...
@@ -35,7 +35,7 @@ int spec_adj_freq(Integer32 adj)
}
int
pp_adj_freq
(
Integer32
adj
)
__attribute__
((
alias
(
"
spe
c_adj_freq"
)));
__attribute__
((
alias
(
"
wrp
c_adj_freq"
)));
int32_t
pp_set_tstamp
(
TimeInternal
*
t
)
__attribute__
((
alias
(
"
spe
c_set_tstamp"
)));
__attribute__
((
alias
(
"
wrp
c_set_tstamp"
)));
arch-
spec/spe
c-socket.c
→
arch-
wrpc/wrp
c-socket.c
View file @
7a4696c3
...
...
@@ -2,7 +2,7 @@
* Alessandro Rubini for CERN, 2011 -- GNU LGPL v2.1 or later
*/
#include <ppsi/ppsi.h>
#include "
spe
c.h"
#include "
wrp
c.h"
#include <syscon.h>
#include <pps_gen.h>
#include <minic.h>
...
...
@@ -11,11 +11,11 @@
#include <softpll_ng.h>
#include <ptpd_netif.h>
int
spe
c_errno
;
int
wrp
c_errno
;
Octet
buffer_out
[
PP_PACKET_SIZE
+
14
];
// 14 is ppi->proto_ofst for ethernet mode
/* This function should init the minic and get the mac address */
int
spe
c_open_ch
(
struct
pp_instance
*
ppi
)
int
wrp
c_open_ch
(
struct
pp_instance
*
ppi
)
{
wr_socket_t
*
sock
;
mac_addr_t
mac
;
...
...
@@ -39,7 +39,7 @@ int spec_open_ch(struct pp_instance *ppi)
}
/* To receive and send packets, we call the minic low-level stuff */
int
spe
c_recv_packet
(
struct
pp_instance
*
ppi
,
void
*
pkt
,
int
len
,
int
wrp
c_recv_packet
(
struct
pp_instance
*
ppi
,
void
*
pkt
,
int
len
,
TimeInternal
*
t
)
{
int
got
;
...
...
@@ -63,7 +63,7 @@ int spec_recv_packet(struct pp_instance *ppi, void *pkt, int len,
return
got
;
}
int
spe
c_send_packet
(
struct
pp_instance
*
ppi
,
void
*
pkt
,
int
len
,
int
wrp
c_send_packet
(
struct
pp_instance
*
ppi
,
void
*
pkt
,
int
len
,
TimeInternal
*
t
,
int
chtype
,
int
use_pdelay_addr
)
{
int
snt
;
...
...
@@ -101,19 +101,19 @@ int spec_send_packet(struct pp_instance *ppi, void *pkt, int len,
return
snt
;
}
int
spe
c_net_init
(
struct
pp_instance
*
ppi
)
int
wrp
c_net_init
(
struct
pp_instance
*
ppi
)
{
ppi
->
buf_out
=
buffer_out
;
ppi
->
buf_out
=
PROTO_PAYLOAD
(
ppi
->
buf_out
);
ppi
->
buf_out
+=
4
-
(((
int
)
ppi
->
buf_out
)
%
4
);
/* FIXME Alignment */
spe
c_open_ch
(
ppi
);
wrp
c_open_ch
(
ppi
);
return
0
;
}
int
spe
c_net_shutdown
(
struct
pp_instance
*
ppi
)
int
wrp
c_net_shutdown
(
struct
pp_instance
*
ppi
)
{
ptpd_netif_close_socket
(
(
wr_socket_t
*
)
NP
(
ppi
)
->
ch
[
PP_NP_EVT
].
custom
);
...
...
@@ -121,11 +121,11 @@ int spec_net_shutdown(struct pp_instance *ppi)
}
int
pp_net_init
(
struct
pp_instance
*
ppi
)
__attribute__
((
alias
(
"
spe
c_net_init"
)));
__attribute__
((
alias
(
"
wrp
c_net_init"
)));
int
pp_net_shutdown
(
struct
pp_instance
*
ppi
)
__attribute__
((
alias
(
"
spe
c_net_shutdown"
)));
__attribute__
((
alias
(
"
wrp
c_net_shutdown"
)));
int
pp_recv_packet
(
struct
pp_instance
*
ppi
,
void
*
pkt
,
int
len
,
TimeInternal
*
t
)
__attribute__
((
alias
(
"
spe
c_recv_packet"
)));
__attribute__
((
alias
(
"
wrp
c_recv_packet"
)));
int
pp_send_packet
(
struct
pp_instance
*
ppi
,
void
*
pkt
,
int
len
,
TimeInternal
*
t
,
int
chtype
,
int
use_pdelay_addr
)
__attribute__
((
alias
(
"
spe
c_send_packet"
)));
__attribute__
((
alias
(
"
wrp
c_send_packet"
)));
arch-
spec/spe
c-spll.c
→
arch-
wrpc/wrp
c-spll.c
View file @
7a4696c3
...
...
@@ -8,42 +8,42 @@
#include <softpll_ng.h>
#include "../proto-ext-whiterabbit/wr-constants.h"
int
spe
c_spll_locking_enable
(
struct
pp_instance
*
ppi
)
int
wrp
c_spll_locking_enable
(
struct
pp_instance
*
ppi
)
{
spll_init
(
SPLL_MODE_SLAVE
,
0
,
1
);
spll_enable_ptracker
(
0
,
1
);
return
WR_SPLL_OK
;
}
int
spe
c_spll_locking_poll
(
struct
pp_instance
*
ppi
)
int
wrp
c_spll_locking_poll
(
struct
pp_instance
*
ppi
)
{
return
spll_check_lock
(
0
)
?
WR_SPLL_READY
:
WR_SPLL_ERROR
;
}
int
spe
c_spll_locking_disable
(
struct
pp_instance
*
ppi
)
int
wrp
c_spll_locking_disable
(
struct
pp_instance
*
ppi
)
{
/* softpll_disable(); */
return
WR_SPLL_OK
;
}
int
spe
c_spll_enable_ptracker
(
struct
pp_instance
*
ppi
)
int
wrp
c_spll_enable_ptracker
(
struct
pp_instance
*
ppi
)
{
spll_enable_ptracker
(
0
,
1
);
return
WR_SPLL_OK
;
}
int
spe
c_enable_timing_output
(
struct
pp_instance
*
ppi
,
int
enable
)
int
wrp
c_enable_timing_output
(
struct
pp_instance
*
ppi
,
int
enable
)
{
shw_pps_gen_enable_output
(
enable
);
return
WR_SPLL_OK
;
}
int
spe
c_adjust_in_progress
()
int
wrp
c_adjust_in_progress
()
{
return
shw_pps_gen_busy
()
||
spll_shifter_busy
(
0
);
}
int
spe
c_adjust_counters
(
int64_t
adjust_sec
,
int32_t
adjust_nsec
)
int
wrp
c_adjust_counters
(
int64_t
adjust_sec
,
int32_t
adjust_nsec
)
{
if
(
adjust_sec
)
shw_pps_gen_adjust
(
PPSG_ADJUST_SEC
,
adjust_sec
);
...
...
@@ -52,32 +52,32 @@ int spec_adjust_counters(int64_t adjust_sec, int32_t adjust_nsec)
return
0
;
}
int
spe
c_adjust_phase
(
int32_t
phase_ps
)
int
wrp
c_adjust_phase
(
int32_t
phase_ps
)
{
spll_set_phase_shift
(
SPLL_ALL_CHANNELS
,
phase_ps
);
return
WR_SPLL_OK
;
}
int
wr_locking_enable
(
struct
pp_instance
*
ppi
)
__attribute__
((
alias
(
"
spe
c_spll_locking_enable"
)));
__attribute__
((
alias
(
"
wrp
c_spll_locking_enable"
)));
int
wr_locking_poll
(
struct
pp_instance
*
ppi
)
__attribute__
((
alias
(
"
spe
c_spll_locking_poll"
)));
__attribute__
((
alias
(
"
wrp
c_spll_locking_poll"
)));
int
wr_locking_disable
(
struct
pp_instance
*
ppi
)
__attribute__
((
alias
(
"
spe
c_spll_locking_disable"
)));
__attribute__
((
alias
(
"
wrp
c_spll_locking_disable"
)));
int
wr_enable_ptracker
(
struct
pp_instance
*
ppi
)
__attribute__
((
alias
(
"
spe
c_spll_enable_ptracker"
)));
__attribute__
((
alias
(
"
wrp
c_spll_enable_ptracker"
)));
int
wr_enable_timing_output
(
struct
pp_instance
*
ppi
,
int
enable
)
__attribute__
((
alias
(
"
spe
c_enable_timing_output"
)));
__attribute__
((
alias
(
"
wrp
c_enable_timing_output"
)));
int
wr_adjust_in_progress
()
__attribute__
((
alias
(
"
spe
c_adjust_in_progress"
)));
__attribute__
((
alias
(
"
wrp
c_adjust_in_progress"
)));
int
wr_adjust_counters
(
int64_t
adjust_sec
,
int32_t
adjust_nsec
)
__attribute__
((
alias
(
"
spe
c_adjust_counters"
)));
__attribute__
((
alias
(
"
wrp
c_adjust_counters"
)));
int
wr_adjust_phase
(
int32_t
phase_ps
)
__attribute__
((
alias
(
"
spe
c_adjust_phase"
)));
__attribute__
((
alias
(
"
wrp
c_adjust_phase"
)));
arch-
spec/spe
c-timer.c
→
arch-
wrpc/wrp
c-timer.c
View file @
7a4696c3
...
...
@@ -4,26 +4,26 @@
#include <syscon.h>
#include <ptpd_netif.h>
static
struct
pp_timer
spe
c_timers
[
PP_TIMER_ARRAY_SIZE
];
static
struct
pp_timer
wrp
c_timers
[
PP_TIMER_ARRAY_SIZE
];
int
spe
c_timer_init
(
struct
pp_instance
*
ppi
)
int
wrp
c_timer_init
(
struct
pp_instance
*
ppi
)
{
uint32_t
i
;
for
(
i
=
0
;
i
<
PP_TIMER_ARRAY_SIZE
;
i
++
)
ppi
->
timers
[
i
]
=
&
spe
c_timers
[
i
];
ppi
->
timers
[
i
]
=
&
wrp
c_timers
[
i
];
return
0
;
}
int
spe
c_timer_start
(
uint32_t
interval_ms
,
struct
pp_timer
*
tm
)
int
wrp
c_timer_start
(
uint32_t
interval_ms
,
struct
pp_timer
*
tm
)
{
tm
->
start
=
ptpd_netif_get_msec_tics
();
tm
->
interval_ms
=
interval_ms
;
return
0
;
}
int
spe
c_timer_stop
(
struct
pp_timer
*
tm
)
int
wrp
c_timer_stop
(
struct
pp_timer
*
tm
)
{
tm
->
interval_ms
=
0
;
tm
->
start
=
0
;
...
...
@@ -31,7 +31,7 @@ int spec_timer_stop(struct pp_timer *tm)
return
0
;
}
int
spe
c_timer_expired
(
struct
pp_timer
*
tm
)
int
wrp
c_timer_expired
(
struct
pp_timer
*
tm
)
{
uint32_t
now
;
...
...
@@ -50,32 +50,32 @@ int spec_timer_expired(struct pp_timer *tm)
return
0
;
}
void
spe
c_timer_adjust_all
(
struct
pp_instance
*
ppi
,
int32_t
diff
)
void
wrp
c_timer_adjust_all
(
struct
pp_instance
*
ppi
,
int32_t
diff
)
{
/* No need for timer adjust in SPEC: it uses a sort of monotonic
* tstamp for timers
*/
}
uint32_t
spe
c_timer_get_msec_tics
(
void
)
uint32_t
wrp
c_timer_get_msec_tics
(
void
)
{
return
timer_get_tics
();
}
int
pp_timer_init
(
struct
pp_instance
*
ppi
)
__attribute__
((
alias
(
"
spe
c_timer_init"
)));
__attribute__
((
alias
(
"
wrp
c_timer_init"
)));
int
pp_timer_start
(
uint32_t
interval_ms
,
struct
pp_timer
*
tm
)
__attribute__
((
alias
(
"
spe
c_timer_start"
)));
__attribute__
((
alias
(
"
wrp
c_timer_start"
)));
int
pp_timer_stop
(
struct
pp_timer
*
tm
)
__attribute__
((
alias
(
"
spe
c_timer_stop"
)));
__attribute__
((
alias
(
"
wrp
c_timer_stop"
)));
int
pp_timer_expired
(
struct
pp_timer
*
tm
)
__attribute__
((
alias
(
"
spe
c_timer_expired"
)));
__attribute__
((
alias
(
"
wrp
c_timer_expired"
)));
void
pp_timer_adjust_all
(
struct
pp_instance
*
ppi
,
int32_t
diff
)
__attribute__
((
alias
(
"
spe
c_timer_adjust_all"
)));
__attribute__
((
alias
(
"
wrp
c_timer_adjust_all"
)));
uint32_t
wr_timer_get_msec_tics
(
void
)
__attribute__
((
alias
(
"
spe
c_timer_get_msec_tics"
)));
__attribute__
((
alias
(
"
wrp
c_timer_get_msec_tics"
)));
arch-
spec/spe
c.h
→
arch-
wrpc/wrp
c.h
View file @
7a4696c3
...
...
@@ -2,8 +2,8 @@
* Alessandro Rubini for CERN, 2011 -- GNU LGPL v2.1 or later
* Aurelio Colosimo for CERN, 2012 -- GNU LGPL v2.1 or later
*/
#ifndef __
SPE
C_H
#define __
SPE
C_H
#ifndef __
WRP
C_H
#define __
WRP
C_H
#include <ppsi/ppsi.h>
#include <ppsi/diag.h>
...
...
@@ -11,14 +11,14 @@
/*
* These are the functions provided by the various bare files
*/
extern
int
spe
c_open_ch
(
struct
pp_instance
*
ppi
);
extern
int
wrp
c_open_ch
(
struct
pp_instance
*
ppi
);
extern
int
spe
c_recv_packet
(
struct
pp_instance
*
ppi
,
void
*
pkt
,
int
len
,
extern
int
wrp
c_recv_packet
(
struct
pp_instance
*
ppi
,
void
*
pkt
,
int
len
,
TimeInternal
*
t
);
extern
int
spe
c_send_packet
(
struct
pp_instance
*
ppi
,
void
*
pkt
,
int
len
,
extern
int
wrp
c_send_packet
(
struct
pp_instance
*
ppi
,
void
*
pkt
,
int
len
,
TimeInternal
*
t
,
int
chtype
,
int
use_pdelay_addr
);
extern
void
spe
c_main_loop
(
struct
pp_instance
*
ppi
);
extern
void
wrp
c_main_loop
(
struct
pp_instance
*
ppi
);
extern
void
_irq_entry
(
void
);
/* unused, to make crt0.S happy */
extern
int
main
(
void
);
/* alias to ppsi_main, so crt0.S is happy */
...
...
@@ -31,7 +31,7 @@ typedef struct {
/* WR-PTP role of the port (Master, Slave, etc.) */
int
mode
;
/* TX and RX delays (combined, big Deltas from the link model in the
spe
c) */
/* TX and RX delays (combined, big Deltas from the link model in the
wrp
c) */
uint32_t
delta_tx
;
uint32_t
delta_rx
;
...
...
@@ -74,14 +74,14 @@ extern int halexp_get_port_state(hexp_port_state_t *state,
/* End halexp_port_state */
/* syscall-lookalike */
extern
int
spe
c_time
(
void
);
extern
void
spe
c_udelay
(
int
usecs
);
extern
int
spe
c_errno
;
extern
int
wrp
c_time
(
void
);
extern
void
wrp
c_udelay
(
int
usecs
);
extern
int
wrp
c_errno
;
/* Dev stuff */
extern
void
spe
c_putc
(
int
c
);
extern
void
spe
c_puts
(
const
char
*
s
);
extern
int
spe
c_testc
(
void
);
extern
void
wrp
c_putc
(
int
c
);
extern
void
wrp
c_puts
(
const
char
*
s
);
extern
int
wrp
c_testc
(
void
);
static
inline
void
delay
(
int
x
)
{
...
...
@@ -90,7 +90,7 @@ static inline void delay(int x)
/* other network stuff, bah.... */
struct
spe
c_ethhdr
{
struct
wrp
c_ethhdr
{
unsigned
char
h_dest
[
6
];
unsigned
char
h_source
[
6
];
uint16_t
h_proto
;
...
...
@@ -130,4 +130,4 @@ struct spec_ethhdr {
#define REF_CLOCK_PERIOD_PS 8000
#define REF_CLOCK_FREQ_HZ 125000000
#endif
#endif
/* __WRPC_H */
arch-
spec/spe
c.lds
→
arch-
wrpc/wrp
c.lds
View file @
7a4696c3
File moved
doc/Documentation
View file @
7a4696c3
...
...
@@ -33,7 +33,7 @@ __________________________________________________________
| PTP PROTOCOL | NET TRANSPORT PROTOCOL |
| IEEE1588 | WR-EXT | UDP | IEEE802.3 |
| | | | |
spe
c | X | X | | X |
wrp
c | X | X | | X |
gnu-linux | X | | X | X |
__________|____________|_________|________|_______________|
...
...
@@ -53,7 +53,7 @@ the extension:
arch-gnu-linux/ The default for hosted compile
arch-bare-linux/ A freestanding implementation (i386 syscalls)
arch-
spec/ For the SPEC card
, lm32 processor
arch-
wrpc/ For WRPC-SW
, lm32 processor
proto-standard/ Standard PTP implementation
proto-ext-whiterabbit/ Additional code for White Rabbit
...
...
proto-ext-whiterabbit/wr-api.h
View file @
7a4696c3
...
...
@@ -75,7 +75,7 @@ int wr_resp_calib_req(struct pp_instance *ppi, unsigned char *pkt, int plen);
int
wr_link_on
(
struct
pp_instance
*
ppi
,
unsigned
char
*
pkt
,
int
plen
);
/* White Rabbit hw-dependent functions (they are indeed implemented in
* arch-
spe
c or any other arch- */
* arch-
wrp
c or any other arch- */
int
wr_locking_enable
(
struct
pp_instance
*
ppi
);
int
wr_locking_poll
(
struct
pp_instance
*
ppi
);
int
wr_locking_disable
(
struct
pp_instance
*
ppi
);
...
...
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