Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
FMC DEL 1ns 4cha - Software
Commits
ebd5848f
Commit
ebd5848f
authored
May 02, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set-time: restore GCR after setting time
parent
0ab4f3b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
time.c
time.c
+4
-2
No files found.
time.c
View file @
ebd5848f
...
...
@@ -20,13 +20,14 @@
/* If fd_time is not null, use it. if ts is not null, use it, else current */
int
fd_time_set
(
struct
spec_fd
*
fd
,
struct
fd_time
*
t
,
struct
timespec
*
ts
)
{
uint32_t
tcr
;
uint32_t
tcr
,
gcr
;
unsigned
long
flags
;
struct
timespec
localts
;
spin_lock_irqsave
(
&
fd
->
lock
,
flags
);
fd_writel
(
fd
,
0
,
FD_REG_GCR
);
gcr
=
fd_readl
(
fd
,
FD_REG_GCR
);
fd_writel
(
fd
,
0
,
FD_REG_GCR
);
/* zero the GCR while setting time */
if
(
t
)
{
fd_writel
(
fd
,
t
->
utc
>>
32
,
FD_REG_TM_SECH
);
fd_writel
(
fd
,
t
->
utc
&
0xffffffff
,
FD_REG_TM_SECL
);
...
...
@@ -47,6 +48,7 @@ int fd_time_set(struct spec_fd *fd, struct fd_time *t, struct timespec *ts)
tcr
=
fd_readl
(
fd
,
FD_REG_TCR
);
fd_writel
(
fd
,
tcr
|
FD_TCR_SET_TIME
,
FD_REG_TCR
);
fd_writel
(
fd
,
gcr
,
FD_REG_GCR
);
/* Restore GCR */
spin_unlock_irqrestore
(
&
fd
->
lock
,
flags
);
return
0
;
...
...
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