Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC Bus
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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 Bus
Commits
bc0868b7
Commit
bc0868b7
authored
Jul 24, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fmc.h: offser fmc_writel and fmc_readl
parent
3aa84fab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
fmc.h
kernel/include/linux/fmc.h
+15
-0
No files found.
kernel/include/linux/fmc.h
View file @
bc0868b7
...
...
@@ -58,6 +58,21 @@ struct fmc_device {
};
#define to_fmc_device(x) container_of((x), struct fmc_device, dev)
/* If the carrier offers no readl/writel, use base address */
static
inline
uint32_t
fmc_readl
(
struct
fmc_device
*
fmc
,
int
offset
)
{
if
(
unlikely
(
fmc
->
op
->
readl
))
return
fmc
->
op
->
readl
(
fmc
,
offset
);
return
readl
(
fmc
->
base
+
offset
);
}
static
inline
void
fmc_writel
(
struct
fmc_device
*
fmc
,
uint32_t
val
,
int
off
)
{
if
(
unlikely
(
fmc
->
op
->
writel
))
fmc
->
op
->
writel
(
fmc
,
val
,
off
);
else
writel
(
val
,
fmc
->
base
+
off
);
}
extern
int
fmc_driver_register
(
struct
fmc_driver
*
drv
);
extern
void
fmc_driver_unregister
(
struct
fmc_driver
*
drv
);
extern
int
fmc_device_register
(
struct
fmc_device
*
tdev
);
...
...
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