Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wr-switch-sw
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
wr-switch-sw
Commits
33d70757
Commit
33d70757
authored
Oct 16, 2014
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc: and userspace: fix docs and comments due to merge of libptpnetif and libswitchhw
parent
706b0a02
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
34 deletions
+16
-34
wrs-developer-manual.in
doc/wrs-developer-manual.in
+3
-6
wrs-todo.in
doc/wrs-todo.in
+0
-6
wrs-user-manual.in
doc/wrs-user-manual.in
+1
-1
fpga_io.h
userspace/include/fpga_io.h
+1
-1
README
userspace/libwr/README
+8
-15
ptpd_netif.c
userspace/libwr/ptpd_netif.c
+0
-2
rtu_stat.c
userspace/tools/rtu_stat.c
+1
-1
hal_main.c
userspace/wrsw_hal/hal_main.c
+1
-1
README
userspace/wrsw_rtud/README
+1
-1
No files found.
doc/wrs-developer-manual.in
View file @
33d70757
...
...
@@ -766,9 +766,6 @@ A plain @i{make} in
@t{userspace/ppsi} will likely fail, because of
missing environment variables.
Additionally, the script installs headers for the HAL
and @i{libptpnetif}.
@c --------------------------------------------------------------------------
@node User Space Applications
@subsection User Space Applications
...
...
@@ -790,7 +787,7 @@ The main components are:
to exchange information among themselves or query the LM32
that is running on the FPGA.
@item lib
switchhw
@item lib
wr
A series of utility functions to access the switch itself.
...
...
@@ -1757,7 +1754,7 @@ version. This setup is then read by the software in order to load
the correct FPGA binaries and use the proper I/Os. Please be aware
that if you upgrade your SCB from LX130T to LX240T but keep the same
backplane you might need to change the DIP switch configuration.
Check the code from @code{userspace/lib
switchhw
/i2c_io.c} code to
Check the code from @code{userspace/lib
wr
/i2c_io.c} code to
know how to reconfigure the DIP switch for you upgraded device.
For example, the v3.3 backplane with v3.3 LX240T SCB must be configured as bellow:
...
...
@@ -1812,6 +1809,6 @@ on the mailing list if you don't find help there.
@
c
LocalWords
:
Tomasz
Wlostowski
buildroot
distclean
defconfig
wrswitch
REPO
@
c
LocalWords
:
menuconfig
config
dataflash
whiterabbit
stdout
stderr
svnsync
@
c
LocalWords
:
filesystem
diff
ohwr
http
mkdir
linux
rubini
itemize
PTPd
VHDL
@
c
LocalWords
:
noposix
ptpd
userspace
lib
switchhw
DataFlash
NAND
barebox
FPGA
@
c
LocalWords
:
noposix
ptpd
userspace
lib
wr
DataFlash
NAND
barebox
FPGA
@
c
LocalWords
:
Atmel
Kconfig
minicom
tinyserial
ttyUSB
bootloader
logfile
@
c
LocalWords
:
nandflash
gateware
TFTP
init
wrboot
wiki
doc/wrs-todo.in
View file @
33d70757
...
...
@@ -213,12 +213,6 @@ As a side effect, a file-based interface allows off-switch simulation
and development (which includes simulating errors to test error paths in
the actual code).
@item Whether or not we port some stuff in kernel space, we need to have
a single @i
{
libwr
}
, to merge and replace @i
{
libptpnetif
}
and
@i
{
libswitchhw
}
. The role of each of them is not really clear to
developers at this point, and using a single library will simplify
building the tools;
@item While merging the libraries, we should seriously audit them.
Some functions do nothing, some are never called, and some are only
used withing the @i
{
hal
}
process, so there's no need to have them
...
...
doc/wrs-user-manual.in
View file @
33d70757
...
...
@@ -685,6 +685,6 @@ on the mailing list if you don't find help there.
@c LocalWords: Tomasz Wlostowski buildroot distclean defconfig wrswitch REPO
@c LocalWords: menuconfig config dataflash whiterabbit stdout stderr svnsync
@c LocalWords: filesystem diff ohwr http mkdir linux rubini itemize PTPd VHDL
@c LocalWords: noposix ptpd userspace lib
switchhw
DataFlash NAND barebox FPGA
@c LocalWords: noposix ptpd userspace lib
wr
DataFlash NAND barebox FPGA
@c LocalWords: Atmel Kconfig minicom tinyserial ttyUSB bootloader logfile
@c LocalWords: nandflash gateware TFTP init wrboot wiki
userspace/include/fpga_io.h
View file @
33d70757
...
...
@@ -4,7 +4,7 @@
#include <stdint.h>
/* Base addresses of all FPGA peripherals used in lib
switchhw
*/
/* Base addresses of all FPGA peripherals used in lib
wr
*/
/* PPS Generator */
#define FPGA_BASE_PPS_GEN 0x10500
...
...
userspace/libwr/README
View file @
33d70757
Switch V
2 Hardware Library (libswitchhw
)
Switch V
3 Hardware Library (libwr
)
-------------------------------
Lib
switchhw
is a collection of low-level userspace drivers for various
Lib
wr
is a collection of low-level userspace drivers for various
peripherals in the switch, which do not need kernel modules. These are:
- Main FPGA (fpga_io.c) and CPU GPIO ports (pio.c), pin definitions (pio_pins.c)
- AD9516 PLL and clock distribution chip (ad9516.c)
- SPI master for communication with the timing FPGA (clkb_io.c)
- DMTD phase shifter PLL (dmpll.c, main clock recovery PLL - obsolete in V3,
to be replaced by the SoftPLL)
- Helper PLL (hpll.c, producing the "slightly offset" frequency for the DMTDs -
obsolete in V3, to be replaced by the SoftPLL)
- Main FPGA (fpga_io.c) and CPU GPIO ports (pio.c), pin definitions (shw_io.c)
- PPS generator (pps_gen.c, adjustment of time)
-
Watchdog SPI link (watchdog
.c)
-
PHY calibrators (phy_calibration.c, xpoint.c, DS90LVxx buffers in the
MiniBackplane V2, ADN4600 crosspoint for clock feedback) and the calibration DMTDs
-
Altera FPGA bootloader & revision management (mblaster.c, fpgaboot
.c)
-
fan control (fan
.c)
-
i2c communication (i2c.c)
- SFP communication (i2c_sfp.c)
-
Network API for WR-PTPd (ptpd_netif
.c)
Libswitchhw also provides a single routine to initialize all that stuff (see init.c)
Libwr also provides a single routine to initialize all that stuff (see init.c)
and some utility/tracing functions (trace.c, util.c)
userspace/libwr/ptpd_netif.c
View file @
33d70757
...
...
@@ -504,8 +504,6 @@ int ptpd_netif_recvfrom(wr_socket_t *sock, wr_sockaddr_t *from, void *data,
return
ret
-
sizeof
(
struct
ethhdr
);
}
/* We don't need these functions in V3/spec anymore - the transceivers are deterministic! */
int
ptpd_netif_adjust_counters
(
int64_t
adjust_sec
,
int32_t
adjust_nsec
)
{
hexp_pps_params_t
p
;
...
...
userspace/tools/rtu_stat.c
View file @
33d70757
...
...
@@ -115,7 +115,7 @@ int fetch_rtu_vd(rtudexp_vd_entry_t *d, int *n_entries)
/**
* \brief Write mac address into a buffer to avoid concurrent access on static variable.
*/
//TODO: already defined in wrsw_rtud lib but we do not link to it. 3 opts: make it inline, move to lib
switchhw
or link to the rtud lib?
//TODO: already defined in wrsw_rtud lib but we do not link to it. 3 opts: make it inline, move to lib
wr
or link to the rtud lib?
char
*
mac_to_buffer
(
uint8_t
mac
[
ETH_ALEN
],
char
buffer
[
ETH_ALEN_STR
])
{
if
(
mac
&&
buffer
)
...
...
userspace/wrsw_hal/hal_main.c
View file @
33d70757
...
...
@@ -60,7 +60,7 @@ int hal_setup_fpga_images()
// shw_set_fpga_firmware_path(fpga_dir);
/* check if the config demands a particular bitstream (otherwise lib
switchhw
will load the default ones) */
/* check if the config demands a particular bitstream (otherwise lib
wr
will load the default ones) */
/* if( !hal_config_get_string("global.main_firmware", fw_name, sizeof(fw_name)))
shw_request_fpga_firmware(FPGA_ID_MAIN, fw_name);
...
...
userspace/wrsw_rtud/README
View file @
33d70757
...
...
@@ -85,7 +85,7 @@ wr_rtu.h:
============
../include
../lib
switchhw
../lib
wr
../../kernel/include/
The support for the RTU IRQ is implemented in the package "wr_rtu" at
...
...
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