Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC TDC 1ns 5cha - 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 TDC 1ns 5cha - Software
Commits
ac864996
Commit
ac864996
authored
Aug 27, 2012
by
Samuel Iglesias Gonsálvez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tdc: reset and setup local clock in SPEC
Signed-off-by:
Samuel Iglesias Gonsálvez
<
siglesias@igalia.com
>
parent
55046ac1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
tdc-core.c
tdc-core.c
+18
-0
No files found.
tdc-core.c
View file @
ac864996
...
...
@@ -101,6 +101,11 @@ int tdc_probe(struct spec_dev *dev)
struct
spec_tdc
*
tdc
;
int
dev_id
;
/* FIXME: create a new function to do this... */
int
freq
=
160
;
int
divot
;
int
data
;
tdc
=
kzalloc
(
sizeof
(
struct
spec_tdc
),
GFP_KERNEL
);
if
(
!
tdc
)
{
pr_err
(
"%s: can't allocate device
\n
"
,
__func__
);
...
...
@@ -113,6 +118,19 @@ int tdc_probe(struct spec_dev *dev)
tdc
->
regs
=
tdc
->
base
;
/* FIXME: */
tdc
->
ow_regs
=
tdc
->
base
;
/* FIXME: */
/* FIXME: */
/* Setup local clock */
divot
=
800
/
freq
-
1
;
data
=
0xe001f00c
+
(
divot
<<
4
);
writel
(
data
,
dev
->
remap
[
2
]
+
0x808
);
msleep
(
100
);
/* Reset */
writel
(
readl
(
dev
->
remap
[
2
]
+
0x800
)
&
~
(
1
<<
14
||
1
<<
15
),
dev
->
remap
[
2
]
+
0x800
);
msleep
(
100
);
tdc
->
hwzdev
=
zio_allocate_device
();
if
(
IS_ERR
(
tdc
->
hwzdev
))
return
PTR_ERR
(
tdc
->
hwzdev
);
...
...
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