Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple PCIe FMC carrier SPEC - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
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 PCIe FMC carrier SPEC - Software
Commits
8070c61b
Commit
8070c61b
authored
Aug 01, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spec: reprogram() goes golden on NULL, as documented
parent
61446875
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
2 deletions
+6
-2
fmc-sdb.h
kernel/include/linux/fmc-sdb.h
+1
-0
spec-fmc.c
kernel/spec-fmc.c
+3
-1
spec-pci.c
kernel/spec-pci.c
+1
-1
spec.h
kernel/spec.h
+1
-0
No files found.
kernel/include/linux/fmc-sdb.h
View file @
8070c61b
...
...
@@ -32,3 +32,4 @@ struct sdb_array {
extern
int
fmc_scan_sdb_tree
(
struct
fmc_device
*
fmc
,
unsigned
long
address
);
extern
void
fmc_show_sdb_tree
(
struct
fmc_device
*
fmc
);
extern
unsigned
long
fmc_find_sdb_device
(
struct
sdb_array
*
tree
);
extern
int
fmc_free_sdb_tree
(
struct
fmc_device
*
fmc
);
kernel/spec-fmc.c
View file @
8070c61b
...
...
@@ -11,6 +11,7 @@
#include <linux/fmc.h>
#include <linux/interrupt.h>
#include <linux/moduleparam.h>
#include <linux/fmc-sdb.h>
#include "spec.h"
static
int
spec_test_irq
;
...
...
@@ -26,7 +27,7 @@ static int spec_reprogram(struct fmc_device *fmc, char *gw)
int
ret
;
if
(
!
gw
)
return
0
;
gw
=
spec_fw_name
;
if
(
!
strlen
(
gw
))
{
/* FIXME: use module parameters */
...
...
@@ -38,6 +39,7 @@ static int spec_reprogram(struct fmc_device *fmc, char *gw)
dev_warn
(
dev
,
"request firmware
\"
%s
\"
: error %i
\n
"
,
gw
,
ret
);
goto
out
;
}
fmc_free_sdb_tree
(
fmc
);
ret
=
spec_load_fpga
(
spec
,
fw
->
data
,
fw
->
size
);
if
(
ret
<
0
)
{
dev_err
(
dev
,
"write firmware
\"
%s
\"
: error %i
\n
"
,
gw
,
ret
);
...
...
kernel/spec-pci.c
View file @
8070c61b
...
...
@@ -24,7 +24,7 @@
#include "spec.h"
#include "loader-ll.h"
static
char
*
spec_fw_name
=
"fmc/spec-init.bin"
;
char
*
spec_fw_name
=
"fmc/spec-init.bin"
;
module_param_named
(
fw_name
,
spec_fw_name
,
charp
,
0444
);
/* Load the FPGA. This bases on loader-ll.c, a kernel/user space thing */
...
...
kernel/spec.h
View file @
8070c61b
...
...
@@ -118,6 +118,7 @@ static inline void gennum_mask_val(struct spec_dev *spec,
/* Functions in spec-pci.c */
extern
int
spec_load_fpga
(
struct
spec_dev
*
spec
,
const
void
*
data
,
int
size
);
extern
int
spec_load_fpga_file
(
struct
spec_dev
*
spec
,
char
*
name
);
extern
char
*
spec_fw_name
;
/* Functions in spec-fmc.c, used by spec-pci.c */
extern
int
spec_fmc_create
(
struct
spec_dev
*
spec
);
...
...
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