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
e12ca069
Commit
e12ca069
authored
Aug 28, 2019
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:drv:spi: rename variable and fix CHAR_LEN assignment
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
80e46f5d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
spi-ocores.c
software/kernel/spi-ocores.c
+4
-5
No files found.
software/kernel/spi-ocores.c
View file @
e12ca069
...
...
@@ -432,11 +432,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
;
uint8_t
nbits
;
uint32_t
hz
;
bits_per_word
=
spi_ocores_hw_xfer_bits_per_word
(
sp
);
if
(
bits_per_word
>
128
)
nbits
=
spi_ocores_hw_xfer_bits_per_word
(
sp
);
if
(
nbits
>
128
)
return
-
EINVAL
;
if
(
!
sp
->
cur_xfer
)
{
...
...
@@ -455,12 +455,11 @@ static int spi_ocores_sw_xfer_next_init(struct spi_ocores *sp)
}
sp
->
cur_ctrl
=
sp
->
ctrl_base
;
sp
->
cur_ctrl
|=
bits_per_word
;
sp
->
cur_ctrl
|=
(
nbits
&
SPI_OCORES_CTRL_CHAR_LEN
)
;
if
(
sp
->
cur_xfer
->
speed_hz
)
hz
=
sp
->
cur_xfer
->
speed_hz
;
else
hz
=
sp
->
master
->
cur_msg
->
spi
->
max_speed_hz
;
sp
->
cur_ctrl
|=
(
sp
->
cur_xfer
->
len
*
8
)
&
SPI_OCORES_CTRL_CHAR_LEN
;
sp
->
cur_divider
=
1
+
(
sp
->
clock_hz
/
(
hz
*
2
));
sp
->
cur_tx_buf
=
sp
->
cur_xfer
->
tx_buf
;
...
...
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