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
104d5318
Commit
104d5318
authored
Sep 13, 2012
by
Samuel Iglesias Gonsálvez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tdc: update initialization of the device
parent
8dd006ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
tdc-fmc.c
drivers/tdc-fmc.c
+11
-1
No files found.
drivers/tdc-fmc.c
View file @
104d5318
...
...
@@ -232,7 +232,10 @@ int tdc_fmc_probe(struct fmc_device *dev)
#endif
for
(
i
=
0
;
i
<
TDC_CHAN_NUMBER
;
i
++
)
sema_init
(
&
tdc
->
event
[
i
].
lock
,
0
);
/* Disable inputs */
tdc_set_input_enable
(
tdc
,
0
);
/* Disable running acquisition, if any */
tdc_deactivate_acquisition
(
tdc
);
/* Setup the Gennum 412x local clock frequency */
tdc_fmc_gennum_setup_local_clock
(
tdc
,
160
);
/* Reset FPGA to load the firmware */
...
...
@@ -243,6 +246,12 @@ int tdc_fmc_probe(struct fmc_device *dev)
tdc_acam_reset
(
tdc
);
/* Initialice UTC time */
tdc_set_local_utc_time
(
tdc
);
/* Initialize DAC */
tdc_set_dac_word
(
tdc
,
0xA8F5
);
/* Initialize timestamp threshold */
tdc_set_irq_tstamp_thresh
(
tdc
,
255
);
/* Initialize time threshold */
tdc_set_irq_time_thresh
(
tdc
,
256
);
/* Prepare the irq work */
INIT_WORK
(
&
tdc
->
irq_work
,
tdc_fmc_irq_work
);
/* Request the IRQ */
...
...
@@ -250,6 +259,7 @@ int tdc_fmc_probe(struct fmc_device *dev)
/* Enable IRQ */
writel
(
0xC
,
tdc
->
base
+
TDC_IRQ_ENABLE_REG
);
/* FIXME: define constant 0xC */
return
tdc_zio_register_device
(
tdc
);
}
...
...
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