Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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 DEL 1ns 4cha - Software
Commits
c1e25312
Commit
c1e25312
authored
Oct 22, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: make fd_readl/writel use fmc_readl/writel
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
6669848d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
fine-delay.h
kernel/fine-delay.h
+4
-2
onewire.c
kernel/onewire.c
+2
-2
No files found.
kernel/fine-delay.h
View file @
c1e25312
...
...
@@ -101,6 +101,7 @@ enum fd_output_mode {
#ifdef __KERNEL__
/* All the rest is only of kernel users */
#include <linux/spinlock.h>
#include <linux/timer.h>
#include <linux/fmc.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)
#include <linux/math64.h>
...
...
@@ -125,6 +126,7 @@ static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
#endif
#define FD_REGS_BASE 0x80000
/* sdb_find_device(cern, f19ede1a) */
#define FD_OWREGS_BASE (FD_REGS_BASE + 0x500)
struct
fd_calib
{
int64_t
frr_poly
[
3
];
/* SY89295 delay/temp poly coeffs */
...
...
@@ -221,11 +223,11 @@ static inline void fd_split_pico(uint64_t pico,
static
inline
uint32_t
fd_readl
(
struct
fd_dev
*
fd
,
unsigned
long
reg
)
{
return
readl
(
fd
->
regs
+
reg
);
return
fmc_readl
(
fd
->
fmc
,
FD_REGS_BASE
+
reg
);
}
static
inline
void
fd_writel
(
struct
fd_dev
*
fd
,
uint32_t
v
,
unsigned
long
reg
)
{
writel
(
v
,
fd
->
regs
+
reg
);
fmc_writel
(
fd
->
fmc
,
v
,
FD_REGS_BASE
+
reg
);
}
static
inline
void
__check_chan
(
int
x
)
...
...
kernel/onewire.c
View file @
c1e25312
...
...
@@ -56,12 +56,12 @@
static
void
ow_writel
(
struct
fd_dev
*
fd
,
uint32_t
val
,
unsigned
long
reg
)
{
writel
(
val
,
fd
->
ow_regs
+
reg
);
fmc_writel
(
fd
->
fmc
,
val
,
FD_OWREGS_BASE
+
reg
);
}
static
uint32_t
ow_readl
(
struct
fd_dev
*
fd
,
unsigned
long
reg
)
{
return
readl
(
fd
->
ow_regs
+
reg
);
return
fmc_readl
(
fd
->
fmc
,
FD_OWREGS_BASE
+
reg
);
}
static
int
ow_reset
(
struct
fd_dev
*
fd
,
int
port
)
...
...
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