Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spec-sw
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
fmc-projects
spec
spec-sw
Commits
49178c98
There was an error fetching the commit references. Please try again later.
Commit
49178c98
authored
12 years ago
by
Alessandro Rubini
Browse files
Options
Downloads
Patches
Plain Diff
fmc.h: add validate support
parent
04100bfb
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kernel/include/linux/fmc.h
+14
-1
14 additions, 1 deletion
kernel/include/linux/fmc.h
with
14 additions
and
1 deletion
kernel/include/linux/fmc.h
+
14
−
1
View file @
49178c98
...
...
@@ -10,6 +10,7 @@
#ifndef __LINUX_FMC_H__
#define __LINUX_FMC_H__
#include
<linux/types.h>
#include
<linux/moduleparam.h>
#include
<linux/device.h>
#include
<linux/interrupt.h>
#include
<linux/io.h>
...
...
@@ -22,20 +23,32 @@ struct fmc_device_id {
uint64_t
unique_id
;
};
#define FMC_MAX_CARDS 16
/* That many with the same matching driver... */
/* The driver is a pretty simple thing */
struct
fmc_driver
{
struct
device_driver
driver
;
int
(
*
probe
)(
struct
fmc_device
*
);
int
(
*
remove
)(
struct
fmc_device
*
);
const
struct
fmc_device_id
*
id_table
;
/* What follows is for generic module parameters */
int
busid_n
;
int
busid_val
[
FMC_MAX_CARDS
];
int
gw_n
;
char
*
gw_val
[
FMC_MAX_CARDS
];
};
#define to_fmc_driver(x) container_of((x), struct fmc_driver, driver)
/* These are the generic parameters, that drivers may instantiate */
#define FMC_MODULE_PARAMS(_d) \
module_param_array_named(busid, _d.busid_val, int, &_d.busid_n, 0400); \
module_param_array_named(gateware, _d.gw_val, charp, &_d.gw_n, 0400)
/* To be carrier-independent, we need to abstract hardware access */
struct
fmc_operations
{
uint32_t
(
*
readl
)(
struct
fmc_device
*
fmc
,
int
offset
);
void
(
*
writel
)(
struct
fmc_device
*
fmc
,
uint32_t
value
,
int
offset
);
int
(
*
validate
)(
struct
fmc_device
*
fmc
,
struct
fmc_driver
*
drv
);
int
(
*
reprogram
)(
struct
fmc_device
*
fmc
,
char
*
gateware
);
int
(
*
irq_request
)(
struct
fmc_device
*
fmc
,
irq_handler_t
h
,
char
*
name
,
int
flags
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment