Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Trigger Distribution
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
White Rabbit Trigger Distribution
Commits
9d98a661
Commit
9d98a661
authored
Oct 26, 2018
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrtd: minor cleanup.
parent
d11fcb12
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
23 deletions
+10
-23
wrtd-rt-fd.c
software/firmware/fd/wrtd-rt-fd.c
+1
-8
wrtd-rt-tdc.c
software/firmware/tdc/wrtd-rt-tdc.c
+9
-15
No files found.
software/firmware/fd/wrtd-rt-fd.c
View file @
9d98a661
...
...
@@ -17,8 +17,6 @@
#include "wrtd-fd.h"
#define OUT_TIMEOUT 10
#define NBR_CPUS 2
#define CPU_IDX 0
...
...
@@ -41,11 +39,6 @@ struct wrtd_fd_dev fd0 = {
.
io_addr
=
0x0
};
static
int
wr_present
(
void
)
{
return
fd_wr_present
(
&
fd0
);
}
static
int
wr_link_up
(
void
)
{
return
fd_wr_link_up
(
&
fd0
);
...
...
@@ -111,7 +104,7 @@ static int wrtd_o_sim_init(void)
*/
static
int
wrtd_user_init
(
void
)
{
if
(
!
wr_present
(
))
{
if
(
!
fd_wr_present
(
&
fd0
))
{
pr_error
(
"WhiteRabbit not found
\n\r
"
);
return
-
EINVAL
;
}
...
...
software/firmware/tdc/wrtd-rt-tdc.c
View file @
9d98a661
...
...
@@ -14,12 +14,6 @@
#include "hw/fmctdc-direct.h"
#include "hw/tdc_regs.h"
#ifdef SIMULATION
static
const
int
is_simulation
=
1
;
#else
static
const
int
is_simulation
=
0
;
#endif
#define NBR_CPUS 2
#define CPU_IDX 0
...
...
@@ -77,9 +71,9 @@ static void wrtd_local_output(struct wrtd_event *ev, unsigned ch)
return
;
}
#ifdef SIMULATION
static
int
wrtd_i_sim_init
(
struct
wrtd_tdc_dev
*
tdc
)
{
#if 0
/* TODO: preconfigure the rules. */
int
i
;
...
...
@@ -91,25 +85,25 @@ static int wrtd_i_sim_init(struct wrtd_tdc_dev *tdc)
wrtd_in_channels
[
i
].
config
.
flags
=
WRTD_ENABLED
|
WRTD_ARMED
|
WRTD_TRIGGER_ASSIGNED
;
}
#endif
tdc_writel
(
tdc
,
0x40
,
BASE_DP_TDC_DIRECT
+
DR_REG_DEAD_TIME
);
tdc_writel
(
tdc
,
0x1f
,
BASE_DP_TDC_DIRECT
+
DR_REG_CHAN_ENABLE
);
return
0
;
}
#endif
static
int
wrtd_user_init
(
void
)
{
if
(
!
is_simulation
)
tdc_init
(
&
tdc0
);
tdc_wr_enable_lock
(
&
tdc0
,
0
);
#ifdef SIMULATION
/* Skip WR sync and automatically generate some events when
simulating */
if
(
is_simulation
)
wrtd_i_sim_init
(
&
tdc0
);
wrtd_i_sim_init
(
&
tdc0
);
#else
tdc_init
(
&
tdc0
);
#endif
wr_enable_lock
(
0
);
pr_debug
(
"rt-input firmware initialized.
\n\r
"
);
...
...
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