Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple PCIe FMC carrier SPEC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
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
Commits
96e9577d
Commit
96e9577d
authored
Jul 17, 2019
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:drv: fix application platform_device_id generation
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
ee1d4531
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
spec-core-fpga.c
software/kernel/spec-core-fpga.c
+11
-3
No files found.
software/kernel/spec-core-fpga.c
View file @
96e9577d
...
...
@@ -605,12 +605,20 @@ static int spec_fmc_exit(struct spec_fpga *spec_fpga)
}
/* FPGA Application */
/**
* Build the platform_device_id->name from metadata
*
* The byte order on SPEC is little endian, but we want to convert it
* in string. Use big-endian read to swap word and get the string order
* from MSB to LSB
*/
static
int
spec_fpga_app_id_build
(
struct
spec_fpga
*
spec_fpga
,
unsigned
long
app_off
,
char
*
id
,
unsigned
int
size
)
{
uint32_t
vendor
=
ioread32
(
spec_fpga
->
fpga
+
app_off
);
uint32_t
device
=
ioread32
(
spec_fpga
->
fpga
+
app_off
);
uint32_t
vendor
=
ioread32
be
(
spec_fpga
->
fpga
+
app_off
+
FPGA_META_VENDOR
);
uint32_t
device
=
ioread32
be
(
spec_fpga
->
fpga
+
app_off
+
FPGA_META_DEVICE
);
memset
(
id
,
0
,
size
);
if
(
vendor
==
0xFF000000
)
{
...
...
@@ -671,7 +679,7 @@ static int spec_fpga_app_init(struct spec_fpga *spec_fpga)
res_n
=
1
;
}
err
=
spec_fpga_app_id_build
(
spec_fpga
,
SPEC_FPGA_CSR_APP_OFF
,
err
=
spec_fpga_app_id_build
(
spec_fpga
,
app_offset
,
app_name
,
SPEC_FPGA_APP_NAME_MAX
);
if
(
err
)
return
err
;
...
...
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