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
037b748b
Commit
037b748b
authored
Apr 15, 2015
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel:fifo: enable irq according to channel status
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
82a13598
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
ft-zio.c
kernel/ft-zio.c
+25
-0
No files found.
kernel/ft-zio.c
View file @
037b748b
...
...
@@ -288,10 +288,35 @@ static const struct zio_sysfs_operations ft_zio_sysfs_ops = {
.
info_get
=
ft_zio_info_get
,
};
/**
* It enables/disables interrupts according to the enable/disable
* status of the correspondent channel
*/
static
void
ft_change_flags
(
struct
zio_obj_head
*
head
,
unsigned
long
mask
)
{
struct
zio_channel
*
chan
;
struct
fmctdc_dev
*
ft
;
unsigned
int
offset
;
/* We manage only status flag */
if
(
!
(
mask
&
ZIO_STATUS
))
return
;
ft
=
zdev
->
priv_d
;
chan
=
to_zio_chan
(
&
head
->
dev
);
offset
=
(
chan
->
flags
&
ZIO_STATUS
?
TDC_REG_EIC_IDR
:
TDC_REG_EIC_IER
);
fmc_writel
(
ft
->
fmc
,
1
<<
cset
->
index
,
ft
->
ft_irq_base
+
offset
);
}
static
struct
zio_channel
ft_chan_tmpl
=
{
.
change_flags
=
ft_change_flags
,
};
#define DECLARE_CHANNEL(ch_name) \
{\
ZIO_SET_OBJ_NAME(ch_name),\
.raw_io = ft_zio_input,\
.chan_template = &ft_chan_tmpl,\
.n_chan = 1,\
.ssize = 4,
/* FIXME: 0? */
\
.flags = ZIO_DIR_INPUT | ZIO_CSET_TYPE_TIME | \
...
...
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