Commit ceb0c512 authored by Tjeerd Pinkert's avatar Tjeerd Pinkert Committed by Adam Wujek

userspace/tools/wrs_port_tx_control: Include some defines

TODO: these defines need fixing of endpoint-mdio.h which I currently don't
    have the time for. It is another chapter in the code generation.
parent 97d8878d
......@@ -4,8 +4,8 @@
#include <unistd.h>
#include <getopt.h>
#include <libwr/wrs-msg.h>
#include <regs/endpoint-mdio.h>
#include <regs/endpoint-regs.h>
/* #include <regs/endpoint-mdio.h> */
#include <fpga_io.h>
#include <libwr/switch_hw.h>
#include <libwr/shmem.h>
......@@ -18,6 +18,18 @@ static struct EP_WB _ep_wb;
/* convert port number (x) to an endpoint address, x from 0 to 17 on switch */
#define IDX_TO_EP(x) (0x30000 + ((x) * 0x400))
/* FIXME: if include of endpoint-mdio.h is fixed this define can go:
* #ifndef __WBGEN2_REGDEFS_ENDPOINT-MDIO_WB to
* #ifndef __WBGEN2_REGDEFS_ENDPOINT_MDIO_WB, otherwise the MDIO_WB is not
* used and it is not included.
*/
#define MDIO_MCR_PDOWN (1<<11)
/* PCS register address we want to read/write
* FIXME: these addresses could/should go into endpoint-mdio.h
*/
#define MDIO_MCR_ADDRESS 0x0
void help(char *prgname)
{
fprintf(stderr, "%s: Use: \"%s [<options>] <port_nr> <cmd>\n",
......
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