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
b47e6edf
Commit
b47e6edf
authored
Sep 20, 2019
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:drv: rename bootsel getter/setter to have a shorter name
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
d5576038
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
spec-core.c
software/kernel/spec-core.c
+8
-8
No files found.
software/kernel/spec-core.c
View file @
b47e6edf
...
@@ -210,8 +210,8 @@ static void spec_dbg_exit(struct spec_gn412x *spec_gn412x)
...
@@ -210,8 +210,8 @@ static void spec_dbg_exit(struct spec_gn412x *spec_gn412x)
/* SPEC GPIO configuration */
/* SPEC GPIO configuration */
static
void
spec_
gpio_fpga_select
_set
(
struct
spec_gn412x
*
spec_gn412x
,
static
void
spec_
bootsel
_set
(
struct
spec_gn412x
*
spec_gn412x
,
enum
spec_fpga_select
sel
)
enum
spec_fpga_select
sel
)
{
{
switch
(
sel
)
{
switch
(
sel
)
{
case
SPEC_FPGA_SELECT_FPGA_FLASH
:
case
SPEC_FPGA_SELECT_FPGA_FLASH
:
...
@@ -227,7 +227,7 @@ static void spec_gpio_fpga_select_set(struct spec_gn412x *spec_gn412x,
...
@@ -227,7 +227,7 @@ static void spec_gpio_fpga_select_set(struct spec_gn412x *spec_gn412x,
}
}
}
}
static
enum
spec_fpga_select
spec_
gpio_fpga_select
_get
(
struct
spec_gn412x
*
spec_gn412x
)
static
enum
spec_fpga_select
spec_
bootsel
_get
(
struct
spec_gn412x
*
spec_gn412x
)
{
{
enum
spec_fpga_select
sel
=
0
;
enum
spec_fpga_select
sel
=
0
;
...
@@ -556,9 +556,9 @@ static int spec_fw_load(struct spec_gn412x *spec_gn412x, const char *name)
...
@@ -556,9 +556,9 @@ static int spec_fw_load(struct spec_gn412x *spec_gn412x, const char *name)
mutex_lock
(
&
spec_gn412x
->
mtx
);
mutex_lock
(
&
spec_gn412x
->
mtx
);
sel
=
spec_
gpio_fpga_select
_get
(
spec_gn412x
);
sel
=
spec_
bootsel
_get
(
spec_gn412x
);
spec_
gpio_fpga_select
_set
(
spec_gn412x
,
SPEC_FPGA_SELECT_GN4124_FPGA
);
spec_
bootsel
_set
(
spec_gn412x
,
SPEC_FPGA_SELECT_GN4124_FPGA
);
err
=
compat_spec_fw_load
(
spec_gn412x
,
name
);
err
=
compat_spec_fw_load
(
spec_gn412x
,
name
);
if
(
err
)
if
(
err
)
...
@@ -570,7 +570,7 @@ static int spec_fw_load(struct spec_gn412x *spec_gn412x, const char *name)
...
@@ -570,7 +570,7 @@ static int spec_fw_load(struct spec_gn412x *spec_gn412x, const char *name)
"FPGA incorrectly programmed %d
\n
"
,
err
);
"FPGA incorrectly programmed %d
\n
"
,
err
);
out:
out:
spec_
gpio_fpga_select
_set
(
spec_gn412x
,
sel
);
spec_
bootsel
_set
(
spec_gn412x
,
sel
);
mutex_unlock
(
&
spec_gn412x
->
mtx
);
mutex_unlock
(
&
spec_gn412x
->
mtx
);
return
err
;
return
err
;
...
@@ -597,7 +597,7 @@ static ssize_t bootselect_store(struct device *dev,
...
@@ -597,7 +597,7 @@ static ssize_t bootselect_store(struct device *dev,
}
}
mutex_lock
(
&
spec_gn412x
->
mtx
);
mutex_lock
(
&
spec_gn412x
->
mtx
);
spec_
gpio_fpga_select
_set
(
spec_gn412x
,
sel
);
spec_
bootsel
_set
(
spec_gn412x
,
sel
);
mutex_unlock
(
&
spec_gn412x
->
mtx
);
mutex_unlock
(
&
spec_gn412x
->
mtx
);
return
count
;
return
count
;
...
@@ -611,7 +611,7 @@ static ssize_t bootselect_show(struct device *dev,
...
@@ -611,7 +611,7 @@ static ssize_t bootselect_show(struct device *dev,
struct
spec_gn412x
*
spec_gn412x
=
pci_get_drvdata
(
pdev
);
struct
spec_gn412x
*
spec_gn412x
=
pci_get_drvdata
(
pdev
);
enum
spec_fpga_select
sel
;
enum
spec_fpga_select
sel
;
sel
=
spec_
gpio_fpga_select
_get
(
spec_gn412x
);
sel
=
spec_
bootsel
_get
(
spec_gn412x
);
switch
(
sel
)
{
switch
(
sel
)
{
case
SPEC_FPGA_SELECT_FPGA_FLASH
:
case
SPEC_FPGA_SELECT_FPGA_FLASH
:
return
snprintf
(
buf
,
PAGE_SIZE
,
"fpga-flash
\n
"
);
return
snprintf
(
buf
,
PAGE_SIZE
,
"fpga-flash
\n
"
);
...
...
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