Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
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
White Rabbit Switch - Software
Commits
ee089b42
Commit
ee089b42
authored
May 04, 2012
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace: added wr_phytool
parent
0178b38f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
873 additions
and
0 deletions
+873
-0
Makefile
userspace/wr_phytool/Makefile
+33
-0
driver_stuff.h
userspace/wr_phytool/driver_stuff.h
+11
-0
endpoint-regs.h
userspace/wr_phytool/endpoint-regs.h
+312
-0
wr_phytool.c
userspace/wr_phytool/wr_phytool.c
+517
-0
No files found.
userspace/wr_phytool/Makefile
0 → 100644
View file @
ee089b42
# # Standard stanza for cross-compilation (courtesy of the linux makefile)
AS
=
$(CROSS_COMPILE)
as
LD
=
$(CROSS_COMPILE)
ld
CC
=
$(CROSS_COMPILE)
gcc
CPP
=
$(CC)
-E
AR
=
$(CROSS_COMPILE)
ar
NM
=
$(CROSS_COMPILE)
nm
STRIP
=
$(CROSS_COMPILE)
strip
OBJCOPY
=
$(CROSS_COMPILE)
objcopy
OBJDUMP
=
$(CROSS_COMPILE)
objdump
OBJS
=
wr_phytool.o ../ptp-noposix/libptpnetif/ptpd_netif.o ../ptp-noposix/libptpnetif/hal_client.o ../wrsw_hal/rt_client.o
CFLAGS
+=
-O2
-DDEBUG
-I
$(LINUX)
/include
-I
../include
\
-I
../ptp-noposix/libptpnetif
-I
../wrsw_hal
-I
../mini-rpc
LDFLAGS
=
-L
$(WR_INSTALL_ROOT)
/lib
-L
../mini-rpc
-L
../ptp-noposix/libptpnetif
\
-lminipc
BINARY
=
wr_phytool
all
:
$(BINARY)
wr_phytool
:
$(OBJS)
${
CC
}
$^
$(LDFLAGS)
-o
$@
clean
:
rm
-f
$(BINARY)
*
.o
*
~
install
:
install
-d
$(WR_INSTALL_ROOT)
/bin
install
$(BINARY)
$(WR_INSTALL_ROOT)
/bin
userspace/wr_phytool/driver_stuff.h
0 → 100644
View file @
ee089b42
#define PRIV_IOCGCALIBRATE (SIOCDEVPRIVATE + 1)
#define PRIV_IOCGGETPHASE (SIOCDEVPRIVATE + 2)
#define PRIV_IOCREADREG (SIOCDEVPRIVATE + 3)
#define PRIV_IOCPHYREG (SIOCDEVPRIVATE + 4)
#define NIC_READ_PHY_CMD(addr) (((addr) & 0xff) << 16)
#define NIC_RESULT_DATA(val) ((val) & 0xffff)
#define NIC_WRITE_PHY_CMD(addr, value) ((((addr) & 0xff) << 16) \
| (1 << 31) \
| ((value) & 0xffff))
userspace/wr_phytool/endpoint-regs.h
0 → 100644
View file @
ee089b42
This diff is collapsed.
Click to expand it.
userspace/wr_phytool/wr_phytool.c
0 → 100644
View file @
ee089b42
This diff is collapsed.
Click to expand it.
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