Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple PCIe FMC carrier SPEC - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
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
Simple PCIe FMC carrier SPEC - Software
Commits
c1db3e8a
Commit
c1db3e8a
authored
Aug 04, 2014
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vic: helper to know if a source is managed
Signed-nof -by: Federico Vaga <federico.vaga@cern.ch>
parent
15fa14fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
spec-vic.c
kernel/spec-vic.c
+17
-0
spec.h
kernel/spec.h
+1
-0
No files found.
kernel/spec-vic.c
View file @
c1db3e8a
...
@@ -178,6 +178,23 @@ int spec_vic_irq_request(struct spec_dev *spec, struct fmc_device *fmc,
...
@@ -178,6 +178,23 @@ int spec_vic_irq_request(struct spec_dev *spec, struct fmc_device *fmc,
return
-
EINVAL
;
return
-
EINVAL
;
}
}
int
vic_is_managed
(
struct
vic_irq_controller
*
vic
,
unsigned
long
id
)
{
int
i
,
ret
;
if
(
!
vic
)
return
0
;
for
(
i
=
0
;
i
<
VIC_MAX_VECTORS
;
i
++
)
{
if
(
vic
->
vectors
[
i
].
saved_id
!=
id
)
continue
;
ret
=
vic_readl
(
vic
,
VIC_REG_IMR
)
&
(
1
<<
i
);
return
!!
ret
;
}
return
0
;
}
/*
/*
* vic_handler_count
* vic_handler_count
...
...
kernel/spec.h
View file @
c1db3e8a
...
@@ -154,5 +154,6 @@ int spec_vic_irq_request(struct spec_dev *spec, struct fmc_device *fmc,
...
@@ -154,5 +154,6 @@ int spec_vic_irq_request(struct spec_dev *spec, struct fmc_device *fmc,
unsigned
long
id
,
irq_handler_t
handler
);
unsigned
long
id
,
irq_handler_t
handler
);
void
spec_vic_irq_free
(
struct
spec_dev
*
spec
,
unsigned
long
id
);
void
spec_vic_irq_free
(
struct
spec_dev
*
spec
,
unsigned
long
id
);
irqreturn_t
spec_vic_irq_dispatch
(
struct
spec_dev
*
spec
);
irqreturn_t
spec_vic_irq_dispatch
(
struct
spec_dev
*
spec
);
extern
int
vic_is_managed
(
struct
vic_irq_controller
*
vic
,
unsigned
long
id
);
#endif
/* __SPEC_H__ */
#endif
/* __SPEC_H__ */
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