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
af000639
Commit
af000639
authored
Aug 26, 2019
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:drv:spi: use variable for bits_per_word
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
98b2d5db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
spi-ocores.c
software/kernel/spi-ocores.c
+4
-2
No files found.
software/kernel/spi-ocores.c
View file @
af000639
...
...
@@ -462,9 +462,11 @@ static int spi_ocores_sw_xfer_finish(struct spi_ocores *sp)
static
int
spi_ocores_sw_xfer_next_init
(
struct
spi_ocores
*
sp
)
{
struct
list_head
*
head
=
&
sp
->
master
->
cur_msg
->
transfers
;
uint8_t
bits_per_word
;
uint32_t
hz
;
if
(
spi_ocores_hw_xfer_bits_per_word
(
sp
)
>
128
)
bits_per_word
=
spi_ocores_hw_xfer_bits_per_word
(
sp
);
if
(
bits_per_word
>
128
)
return
-
EINVAL
;
if
(
!
sp
->
cur_xfer
)
{
...
...
@@ -481,7 +483,7 @@ static int spi_ocores_sw_xfer_next_init(struct spi_ocores *sp)
}
sp
->
cur_ctrl
=
sp
->
ctrl_base
;
sp
->
cur_ctrl
|=
spi_ocores_hw_xfer_bits_per_word
(
sp
)
;
sp
->
cur_ctrl
|=
bits_per_word
;
if
(
sp
->
cur_xfer
->
speed_hz
)
hz
=
sp
->
cur_xfer
->
speed_hz
;
else
...
...
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