Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple VME FMC Carrier SVEC - 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
Simple VME FMC Carrier SVEC - Software
Commits
b1d45e94
Commit
b1d45e94
authored
Nov 26, 2012
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix CR/CSR access to D32
parent
c7ae44a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
svec_drv.c
kernel/svec_drv.c
+13
-6
No files found.
kernel/svec_drv.c
View file @
b1d45e94
...
...
@@ -188,17 +188,15 @@ static u8 csr_read(void *base, u32 offset)
char
*
p
=
base
;
u8
value
;
value
=
ioread8
(
p
+
offset
)
;
pr_debug
(
"read: 0x%08x -> 0x%02x
\n
"
,
(
u32
)(
p
+
offset
),
value
);
offset
-=
offset
%
4
;
value
=
ioread32be
(
p
+
offset
);
return
value
;
}
static
void
csr_write
(
u8
value
,
void
*
base
,
u32
offset
)
{
char
*
p
=
base
;
pr_debug
(
"write: 0x%08x <- 0x%02x
\n
"
,
(
u32
)(
p
+
offset
),
value
);
iowrite8
(
value
,
p
+
offset
);
offset
-=
offset
%
4
;
iowrite32be
(
value
,
base
+
offset
);
}
void
setup_csr_fa0
(
void
*
base
,
u32
vme
,
unsigned
vector
,
unsigned
level
)
...
...
@@ -233,6 +231,15 @@ void setup_csr_fa0(void *base, u32 vme, unsigned vector, unsigned level)
/* enable module, hence make FUN0 available */
csr_write
(
ENABLE_CORE
,
base
,
BIT_SET_REG
);
pr_debug
(
"base: %02x%02x%02x%02x
\n
"
,
csr_read
(
base
,
FUN0ADER
),
csr_read
(
base
,
FUN0ADER
+
4
),
csr_read
(
base
,
FUN0ADER
+
8
),
csr_read
(
base
,
FUN0ADER
+
12
));
pr_debug
(
"vector: %02x
\n
"
,
csr_read
(
base
,
INTVECTOR
));
pr_debug
(
"level: %02x
\n
"
,
csr_read
(
base
,
INT_LEVEL
));
pr_debug
(
"int_enable: %02x
\n
"
,
csr_read
(
base
,
0x7ff57
));
pr_debug
(
"wb32: %02x
\n
"
,
csr_read
(
base
,
WB_32_64
));
pr_debug
(
"vme_core: %02x
\n
"
,
csr_read
(
base
,
0x7c
));
}
int
svec_load_fpga
(
struct
svec_dev
*
svec
,
const
void
*
blob
,
int
size
)
...
...
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