Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Software
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 ADC 100M 14b 4cha - Software
Commits
525c478b
Commit
525c478b
authored
Apr 07, 2015
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: program FPGA only when GOLDEN is there or user ask for it
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
e977cd5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
fa-core.c
kernel/fa-core.c
+22
-11
No files found.
kernel/fa-core.c
View file @
525c478b
...
...
@@ -467,19 +467,30 @@ int fa_probe(struct fmc_device *fmc)
return
-
ENODEV
;
}
if
(
fa_dev_drv
.
gw_n
)
fwname
=
""
;
/* reprogram will pick from module parameter */
else
fwname
=
fa
->
carrier_op
->
get_gwname
();
dev_info
(
fmc
->
hwdev
,
"Gateware (%s)
\n
"
,
fwname
);
/* We first write a new binary (and lm32) within the carrier */
err
=
fmc
->
op
->
reprogram
(
fmc
,
&
fa_dev_drv
,
fwname
);
if
(
err
)
{
dev_err
(
fmc
->
hwdev
,
"write firmware
\"
%s
\"
: error %i
\n
"
,
/*
* If the carrier is still using the golden bitstream or the user is
* asking for a particular one, then program our bistream, otherwise
* we already have our bitstream
*/
if
(
fmc
->
flags
&
FMC_DEVICE_HAS_GOLDEN
||
fa_dev_drv
.
gw_n
)
{
if
(
fa_dev_drv
.
gw_n
)
fwname
=
""
;
/* reprogram will pick from module parameter */
else
fwname
=
fa
->
carrier_op
->
get_gwname
();
dev_info
(
fmc
->
hwdev
,
"Gateware (%s)
\n
"
,
fwname
);
/* We first write a new binary (and lm32) within the carrier */
err
=
fmc
->
op
->
reprogram
(
fmc
,
&
fa_dev_drv
,
fwname
);
if
(
err
)
{
dev_err
(
fmc
->
hwdev
,
"write firmware
\"
%s
\"
: error %i
\n
"
,
fwname
,
err
);
goto
out
;
goto
out
;
}
dev_info
(
fmc
->
hwdev
,
"Gateware successfully loaded
\n
"
);
}
else
{
dev_info
(
fmc
->
hwdev
,
"Gateware already there. Set the
\"
gateware
\"
parameter to overwrite the current gateware
\n
"
);
}
dev_info
(
fmc
->
hwdev
,
"Gateware successfully loaded
\n
"
);
/* Extract whisbone core base address fron SDB */
err
=
__fa_sdb_get_device
(
fa
);
...
...
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