Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Network Interface Card
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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 Network Interface Card
Commits
ae53da30
Commit
ae53da30
authored
Feb 07, 2013
by
Alessandro Rubini
Committed by
Miguel Jimenez Lopez
Sep 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wr_nic: wr-nic.h changes for spec support
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
2f6babed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
7 deletions
+22
-7
wr-nic.h
kernel/wr_nic/wr-nic.h
+22
-7
No files found.
kernel/wr_nic/wr-nic.h
View file @
ae53da30
...
...
@@ -12,6 +12,19 @@
*/
#ifndef __WR_NIC_H__
#define __WR_NIC_H__
/* Private ioctls, (the first 2 are the same as they were in wr_minic.c */
#define PRIV_IOCGCALIBRATE (SIOCDEVPRIVATE + 1)
#define PRIV_IOCGGETPHASE (SIOCDEVPRIVATE + 2)
#define PRIV_IOCREADREG (SIOCDEVPRIVATE + 3)
#define PRIV_IOCPHYREG (SIOCDEVPRIVATE + 4)
/* The last two available are used for mezzanine-private stuff */
#define PRIV_MEZZANINE_ID (SIOCDEVPRIVATE + 14)
#define PRIV_MEZZANINE_CMD (SIOCDEVPRIVATE + 15)
#ifdef __KERNEL__
/* The rest is kernel-only */
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/mii.h>
/* Needed for stuct mii_if_info in wrn_dev */
...
...
@@ -167,12 +180,6 @@ enum wrn_resnames {
#define wrn_ep_read(ep, reg) __raw_readl(&(ep)->ep_regs->reg)
#define wrn_ep_write(ep, reg, val) __raw_writel((val), &(ep)->ep_regs->reg)
/* Private ioctls, (the first 2 are the same as they were in wr_minic.c */
#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) \
...
...
@@ -235,9 +242,17 @@ extern int wrn_tstamp_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
extern
irqreturn_t
wrn_tstamp_interrupt
(
int
irq
,
void
*
dev_id
);
extern
void
wrn_tstamp_init
(
struct
wrn_dev
*
wrn
);
/* Following functions from dmtd.c */
/* Following functions from dmtd.c
and pps.c
*/
extern
int
wrn_phase_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
);
extern
int
wrn_calib_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
);
extern
void
wrn_ppsg_read_time
(
struct
wrn_dev
*
wrn
,
u32
*
fine_cnt
,
u32
*
utc
);
/* Locally weak, designed for a mezzanine driver to implement */
extern
int
wrn_mezzanine_ioctl
(
struct
net_device
*
dev
,
struct
ifreq
*
rq
,
int
cmd
);
extern
int
wrn_mezzanine_init
(
struct
net_device
*
dev
);
extern
void
wrn_mezzanine_exit
(
struct
net_device
*
dev
);
#endif
/* __KERNEL__ */
#endif
/* __WR_NIC_H__ */
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