Commit 33d70757 authored by Adam Wujek's avatar Adam Wujek 💬

doc: and userspace: fix docs and comments due to merge of libptpnetif and libswitchhw

parent 706b0a02
......@@ -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 libswitchhw
@item libwr
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/libswitchhw/i2c_io.c} code to
Check the code from @code{userspace/libwr/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 libswitchhw DataFlash NAND barebox FPGA
@c LocalWords: noposix ptpd userspace libwr DataFlash NAND barebox FPGA
@c LocalWords: Atmel Kconfig minicom tinyserial ttyUSB bootloader logfile
@c LocalWords: nandflash gateware TFTP init wrboot wiki
......@@ -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
......
......@@ -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 libswitchhw DataFlash NAND barebox FPGA
@c LocalWords: noposix ptpd userspace libwr DataFlash NAND barebox FPGA
@c LocalWords: Atmel Kconfig minicom tinyserial ttyUSB bootloader logfile
@c LocalWords: nandflash gateware TFTP init wrboot wiki
......@@ -4,7 +4,7 @@
#include <stdint.h>
/* Base addresses of all FPGA peripherals used in libswitchhw */
/* Base addresses of all FPGA peripherals used in libwr */
/* PPS Generator */
#define FPGA_BASE_PPS_GEN 0x10500
......
Switch V2 Hardware Library (libswitchhw)
Switch V3 Hardware Library (libwr)
-------------------------------
Libswitchhw is a collection of low-level userspace drivers for various
Libwr 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)
......@@ -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;
......
......@@ -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 libswitchhw 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 libwr or link to the rtud lib?
char *mac_to_buffer(uint8_t mac[ETH_ALEN],char buffer[ETH_ALEN_STR])
{
if(mac && buffer)
......
......@@ -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 libswitchhw will load the default ones) */
/* check if the config demands a particular bitstream (otherwise libwr 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);
......
......@@ -85,7 +85,7 @@ wr_rtu.h:
============
../include
../libswitchhw
../libwr
../../kernel/include/
The support for the RTU IRQ is implemented in the package "wr_rtu" at
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment