Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
28
Issues
28
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
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
Software for White Rabbit PTP Core
Commits
881e1ee4
Commit
881e1ee4
authored
Oct 15, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename WITH_ETHERBONE to CONFIG_ETHERBONE, ready for Kconfig
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
ab30804f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
14 deletions
+17
-14
Makefile
Makefile
+6
-3
ep_pfilter.c
dev/ep_pfilter.c
+3
-3
wrpc.in
doc/wrpc.in
+2
-2
lib.mk
lib/lib.mk
+1
-1
shell.c
shell/shell.c
+1
-1
shell.mk
shell/shell.mk
+1
-1
wrc_main.c
wrc_main.c
+3
-3
No files found.
Makefile
View file @
881e1ee4
# choose your board here.
BOARD
=
spec
#
1 enables Etherbone support
WITH_ETHERBONE
=
0
#
Uncomment to enable Etherbone support (will soon be a Kconfig variable)
# CONFIG_ETHERBONE=y
# and don't touch the rest unless you know what you're doing.
...
...
@@ -24,7 +24,10 @@ INCLUDE_DIRS = -I$(PTP_NOPOSIX)/wrsw_hal \
-I
$(PTP_NOPOSIX)
/softpll
\
-Iinclude
CFLAGS_EB
=
-DWITH_ETHERBONE
=
$(WITH_ETHERBONE)
# Will soon be managed by Kconfig
ifdef
CONFIG_ETHERBONE
CFLAGS_EB
=
-DCONFIG_ETHERBONE
=
1
endif
CFLAGS_PTPD
=
-ffreestanding
\
-DPTPD_FREESTANDING
\
...
...
dev/ep_pfilter.c
View file @
881e1ee4
...
...
@@ -228,7 +228,7 @@ void pfilter_init_default()
pfilter_new
();
pfilter_nop
();
#if
WITH_ETHERBONE != 0
#if
def CONFIG_ETHERBONE
pfilter_cmp
(
0
,
0xffff
,
0xffff
,
MOV
,
1
);
pfilter_cmp
(
1
,
0xffff
,
0xffff
,
AND
,
1
);
pfilter_cmp
(
2
,
0xffff
,
0xffff
,
AND
,
1
);
/* r1 = 1 when dst mac is broadcast */
...
...
@@ -264,7 +264,7 @@ void pfilter_init_default()
pfilter_logic2
(
R_CLASS
(
0
),
15
,
MOV
,
0
);
/* class 0: ICMP/IP(unicast) or ARP(broadcast) or PTPv2 => PTP LM32 core */
pfilter_load
();
#else
#else
/* not etherbone */
pfilter_new
();
pfilter_nop
();
pfilter_cmp
(
0
,
0xffff
,
0xffff
,
MOV
,
1
);
...
...
@@ -281,6 +281,6 @@ void pfilter_init_default()
pfilter_logic2
(
R_CLASS
(
7
),
6
,
NOT
,
0
);
/* class 7: not PTP => external fabric */
pfilter_logic2
(
R_CLASS
(
0
),
6
,
MOV
,
0
);
/* class 0: PTPv2 => PTP LM32 core */
pfilter_load
();
#endif
#endif
/* CONFIG_ETHERBONE */
}
doc/wrpc.in
View file @
881e1ee4
...
...
@@ -340,8 +340,8 @@ later during the software compilation:
Now you have everything that is needed to build the software for WRPC. Before
compilation the decision can be made whether to turn on or not the software
support for Etherbone core that is integrated inside WRPC gateware for SPEC
board. By default it is disabled but can be turned on by setting the
value of
@i
{
WITH
_
ETHERBONE
}
variable
inside the Makefile. The compilation is made by
board. By default it is disabled but can be turned on by setting the
@i
{
CONFIG
_
ETHERBONE
}
variable to @i
{
y
}
inside the Makefile. The compilation is made by
a simple command without any additional parameters:
@example
...
...
lib/lib.mk
View file @
881e1ee4
OBJS_LIB= lib/mprintf.o \
lib/util.o
if
neq ($(WITH_ETHERBONE), 0)
if
def CONFIG_ETHERBONE
OBJS_LIB += lib/arp.o lib/icmp.o lib/ipv4.o lib/bootp.o
...
...
shell/shell.c
View file @
881e1ee4
...
...
@@ -46,7 +46,7 @@ static const struct shell_cmd cmds_list[] = {
{
"time"
,
cmd_time
},
{
"sfp"
,
cmd_sfp
},
{
"init"
,
cmd_init
},
#if
WITH
_ETHERBONE
#if
def CONFIG
_ETHERBONE
{
"ip"
,
cmd_ip
},
#endif
{
"mac"
,
cmd_mac
},
...
...
shell/shell.mk
View file @
881e1ee4
...
...
@@ -13,6 +13,6 @@ OBJS_SHELL = shell/shell.o \
shell/cmd_mac.o \
shell/cmd_init.o
if
neq ($(WITH_ETHERBONE), 0)
if
def CONFIG_ETHERBONE
OBJS_SHELL += shell/cmd_ip.o
endif
wrc_main.c
View file @
881e1ee4
...
...
@@ -68,7 +68,7 @@ void wrc_initialize()
pps_gen_init
();
wrc_ptp_init
();
#if
WITH
_ETHERBONE
#if
def CONFIG
_ETHERBONE
ipv4_init
(
"wru1"
);
arp_init
(
"wru1"
);
#endif
...
...
@@ -159,7 +159,7 @@ int main(void)
int
l_status
=
wrc_check_link
();
switch
(
l_status
)
{
#if
WITH
_ETHERBONE
#if
def CONFIG
_ETHERBONE
case
LINK_WENT_UP
:
needIP
=
1
;
break
;
...
...
@@ -167,7 +167,7 @@ int main(void)
case
LINK_UP
:
update_rx_queues
();
#if
WITH
_ETHERBONE
#if
def CONFIG
_ETHERBONE
ipv4_poll
();
arp_poll
();
#endif
...
...
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