Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple PCIe FMC carrier SPEC - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
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
Simple PCIe FMC carrier SPEC - Software
Commits
a62c8a8b
Commit
a62c8a8b
authored
Sep 21, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wr_nic: pps.c copied from wr-switch version 3.0
parent
62634130
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
pps.c
kernel/wr_nic/pps.c
+31
-0
No files found.
kernel/wr_nic/pps.c
0 → 100644
View file @
a62c8a8b
/*
* Pulse per second management for White-Rabbit switch network interface
*
* Copyright (C) 2010 CERN (www.cern.ch)
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/kernel.h>
#include <linux/netdevice.h>
#include <linux/sockios.h>
#include <linux/net_tstamp.h>
#include "wr-nic.h"
void
wrn_ppsg_read_time
(
struct
wrn_dev
*
wrn
,
u32
*
fine_counter
,
u32
*
utc
)
{
u32
utc1
,
utc2
,
cnt
;
utc1
=
readl
(
&
wrn
->
ppsg_regs
->
CNTR_UTCLO
);
cnt
=
readl
(
&
wrn
->
ppsg_regs
->
CNTR_NSEC
);
utc2
=
readl
(
&
wrn
->
ppsg_regs
->
CNTR_UTCLO
);
if
(
utc2
!=
utc1
)
cnt
=
readl
(
&
wrn
->
ppsg_regs
->
CNTR_NSEC
);
*
utc
=
utc2
;
*
fine_counter
=
cnt
;
}
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