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
3f015bb9
Commit
3f015bb9
authored
12 years ago
by
Alessandro Rubini
Browse files
Options
Downloads
Patches
Plain Diff
fmc.h: minor changes
parent
f9065e5e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kernel/include/linux/fmc.h
+15
-10
15 additions, 10 deletions
kernel/include/linux/fmc.h
with
15 additions
and
10 deletions
kernel/include/linux/fmc.h
+
15
−
10
View file @
3f015bb9
...
@@ -9,6 +9,8 @@
...
@@ -9,6 +9,8 @@
*/
*/
#ifndef __LINUX_FMC_H__
#ifndef __LINUX_FMC_H__
#define __LINUX_FMC_H__
#define __LINUX_FMC_H__
#include
<linux/types.h>
#include
<linux/device.h>
struct
fmc_device
;
struct
fmc_device
;
struct
fmc_driver
;
struct
fmc_driver
;
...
@@ -31,21 +33,24 @@ struct fmc_driver {
...
@@ -31,21 +33,24 @@ struct fmc_driver {
/* To be carrier-independent, we need to abstract hardware access */
/* To be carrier-independent, we need to abstract hardware access */
struct
fmc_operations
{
struct
fmc_operations
{
uint32_t
(
*
readl
)(
struct
fmc_device
*
d
,
int
offset
);
uint32_t
(
*
readl
)(
struct
fmc_device
*
d
,
int
offset
);
uint32_t
(
*
writel
)(
struct
fmc_device
*
d
,
int
offset
,
uint32_t
value
);
void
(
*
writel
)(
struct
fmc_device
*
d
,
int
offset
,
uint32_t
value
);
int
(
*
reprogram
)(
struct
fmc_device
*
d
,
void
*
data
,
int
len
);
void
(
*
irq_ack
)(
struct
fmc_device
*
d
);
void
(
*
irq_ack
)(
struct
fmc_device
*
d
);
int
(
*
read_ee
)(
struct
fmc_device
*
d
,
int
pos
,
void
*
data
,
int
len
);
int
(
*
write_ee
)(
struct
fmc_device
*
d
,
int
pos
,
void
*
data
,
int
len
);
};
};
/* The device reports all information needed to access hw */
/* The device reports all information needed to access hw */
struct
fmc_device
{
struct
fmc_device
{
struct
fmc_device_id
id
;
struct
fmc_device_id
id
;
/* for the match function */
struct
fmc_operations
*
op
;
struct
fmc_operations
*
op
;
/* carrier-provided */
int
irq
;
int
irq
;
/* according to host bus. 0 == none */
int
eeprom_len
;
int
eeprom_len
;
/* Usually 8kB, may be less */
uint8_t
*
eeprom
;
uint8_t
*
eeprom
;
/* Full contents or leading part */
char
*
carrier_name
;
char
*
carrier_name
;
/* "SPEC" or similar, for special use */
void
*
carrier_data
;
void
*
carrier_data
;
/* "struct spec *" or equivalent */
__iomem
void
*
base
;
__iomem
void
*
base
;
/* May be NULL (Etherbone) */
struct
device
dev
;
struct
device
dev
;
/* For Linux use */
};
};
#define to_fmc_device(x) container_of((x), struct fmc_device, dev)
#define to_fmc_device(x) container_of((x), struct fmc_device, dev)
...
...
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