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
f546f89f
Commit
f546f89f
authored
Jul 26, 2016
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel:[plat] use svec resources for sub-devices
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
07e6fea7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
6 deletions
+25
-6
svec-drv.c
kernel/svec-drv.c
+20
-0
svec-fmc.c
kernel/svec-fmc.c
+5
-6
No files found.
kernel/svec-drv.c
View file @
f546f89f
...
...
@@ -28,6 +28,26 @@ static int verbose;
static
void
svec_destroy_misc_device
(
struct
svec_dev
*
svec
);
static
const
struct
resource
svec_csr
=
{
.
name
=
"SVEC CSR mem"
,
.
start
=
0
,
.
end
=
-
1
,
.
flags
=
IORESOURCE_MEM
,
.
parent
=
NULL
,
.
child
=
NULL
,
.
sibling
=
NULL
,
};
static
const
struct
resource
svec_fpga
=
{
.
name
=
"SVEC FPGA mem"
,
.
start
=
0
,
.
end
=
-
1
,
.
flags
=
IORESOURCE_MEM
,
.
parent
=
NULL
,
.
child
=
NULL
,
.
sibling
=
NULL
,
};
module_param
(
verbose
,
int
,
S_IRUGO
);
MODULE_PARM_DESC
(
verbose
,
"Output lots of debugging messages"
);
...
...
kernel/svec-fmc.c
View file @
f546f89f
...
...
@@ -121,9 +121,8 @@ static int svec_create_vic(struct svec_dev *svec)
if
(
ret
<
0
)
return
ret
;
htvic_resource
[
0
].
parent
=
svec
->
map
[
MAP_REG
]
->
res
;
htvic_resource
[
0
].
start
=
svec
->
map
[
MAP_REG
]
->
res
->
start
+
svec
->
cfg_cur
.
vme_base
+
ret
;
htvic_resource
[
0
].
parent
=
&
svec
->
res_mem
[
MAP_REG
];
htvic_resource
[
0
].
start
=
svec
->
res_mem
[
MAP_REG
].
start
+
ret
;
htvic_resource
[
0
].
end
=
htvic_resource
[
0
].
start
+
0x100
-
1
;
htvic_resource
[
0
].
child
=
NULL
;
htvic_resource
[
0
].
sibling
=
NULL
;
...
...
@@ -193,9 +192,8 @@ static int svec_create_trtl(struct svec_dev *svec)
return
ret
;
/* Set the FPGA base address and mockturtle base address */
trtl_resource
[
0
].
parent
=
svec
->
map
[
MAP_REG
]
->
res
;
trtl_resource
[
0
].
start
=
svec
->
map
[
MAP_REG
]
->
res
->
start
+
svec
->
cfg_cur
.
vme_base
+
ret
;
trtl_resource
[
0
].
parent
=
&
svec
->
res_mem
[
MAP_REG
];
trtl_resource
[
0
].
start
=
svec
->
res_mem
[
MAP_REG
].
start
+
ret
;
trtl_resource
[
0
].
end
=
trtl_resource
[
0
].
start
+
0x10000
-
1
;
trtl_resource
[
0
].
child
=
NULL
;
trtl_resource
[
0
].
sibling
=
NULL
;
...
...
@@ -205,6 +203,7 @@ static int svec_create_trtl(struct svec_dev *svec)
trtl_resource
[
1
].
flags
|=
IORESOURCE_IRQ_HIGHEDGE
;
trtl_resource
[
2
].
start
=
irq_find_mapping
(
irqd
,
3
);
trtl_resource
[
2
].
flags
|=
IORESOURCE_IRQ_HIGHEDGE
;
pdev
=
platform_device_register_full
(
&
pdevinfo
);
if
(
IS_ERR_OR_NULL
(
pdev
))
{
dev_err
(
svec
->
dev
,
...
...
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