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
0ec1f9bc
Commit
0ec1f9bc
authored
Apr 24, 2019
by
Miguel Jimenez Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: Add a new kernel parameter (sdb_entry) associated to the custom gateware (fw_name).
parent
9ebfc2ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
spec-pci.c
kernel/spec-pci.c
+9
-2
spec.h
kernel/spec.h
+1
-0
No files found.
kernel/spec-pci.c
View file @
0ec1f9bc
...
...
@@ -34,14 +34,21 @@ static char *spec_fw_name_150t = "fmc/spec-init-150T.bin";
char
*
spec_fw_name
=
""
;
module_param_named
(
fw_name
,
spec_fw_name
,
charp
,
0444
);
unsigned
int
spec_fw_sdb_entry
=
0x100
;
module_param_named
(
sdb_entry
,
spec_fw_sdb_entry
,
int
,
0444
);
int
spec_use_msi
=
0
;
module_param_named
(
use_msi
,
spec_use_msi
,
int
,
0444
);
/**
* According to the PCI device ID, load different golden
*/
static
char
*
spec_golden_name_get
(
unsigned
int
device_id
)
static
char
*
spec_golden_name_get
(
struct
spec_dev
*
dev
)
{
unsigned
int
device_id
=
dev
->
pdev
->
device
;
dev
->
sdb_entry
=
spec_fw_sdb_entry
;
if
(
strlen
(
spec_fw_name
)
>
0
)
return
spec_fw_name
;
switch
(
device_id
)
{
...
...
@@ -125,7 +132,7 @@ static int spec_reconfigure(struct spec_dev *spec, struct fmc_gateware *gw)
/* Load the golden FPGA binary to read the eeprom */
ret
=
spec_load_fpga_file
(
spec
,
spec_golden_name_get
(
spec
->
pdev
->
device
));
spec_golden_name_get
(
spec
));
if
(
ret
)
return
ret
;
...
...
kernel/spec.h
View file @
0ec1f9bc
...
...
@@ -41,6 +41,7 @@ struct spec_dev {
struct
miscdevice
mdev
;
char
name
[
SPEC_NAME_LEN
];
unsigned
int
sdb_entry
;
};
#define SPEC_FLAG_FAKE_EEPROM 0x00000001
...
...
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