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
79d5f4c1
Commit
79d5f4c1
authored
Jul 17, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: added fmc-trivial to test interrupt support
parent
e29f91d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
Makefile
kernel/Makefile
+1
-0
fmc-trivial.c
kernel/fmc-trivial.c
+51
-0
No files found.
kernel/Makefile
View file @
79d5f4c1
...
...
@@ -5,6 +5,7 @@ ccflags-y = -I$M/include
obj-m
=
fmc-core.o
obj-m
+=
spec.o
obj-m
+=
fmc-trivial.o
obj-m
+=
wr-nic.o
spec-objs
=
spec-pci.o
...
...
kernel/fmc-trivial.c
0 → 100644
View file @
79d5f4c1
#include <linux/module.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/fmc.h>
#include "spec.h"
irqreturn_t
t_handler
(
int
irq
,
void
*
dev_id
)
{
struct
fmc_device
*
fmc
=
dev_id
;
struct
spec_dev
*
spec
=
fmc
->
carrier_data
;
/* FIXME: don't assume to be under spec */
dev_info
(
&
spec
->
pdev
->
dev
,
"irq %i
\n
"
,
irq
);
return
IRQ_HANDLED
;
}
int
t_probe
(
struct
fmc_device
*
fmc
)
{
int
ret
;
ret
=
request_irq
(
fmc
->
irq
,
t_handler
,
0
,
"fmc-trivial"
,
fmc
);
return
ret
;
}
int
t_remove
(
struct
fmc_device
*
fmc
)
{
free_irq
(
fmc
->
irq
,
fmc
);
return
0
;
}
static
struct
fmc_driver
t_drv
=
{
.
probe
=
t_probe
,
.
remove
=
t_remove
,
/* no table, as the current match just matches everything */
};
static
int
t_init
(
void
)
{
int
ret
;
ret
=
fmc_driver_register
(
&
t_drv
);
return
ret
;
}
static
void
t_exit
(
void
)
{
fmc_driver_unregister
(
&
t_drv
);
}
module_init
(
t_init
);
module_exit
(
t_exit
);
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