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
2747bef2
Commit
2747bef2
authored
Aug 27, 2019
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:drv:spi: do not push if empty TX buffer
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
af000639
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
spi-ocores.c
software/kernel/spi-ocores.c
+15
-0
No files found.
software/kernel/spi-ocores.c
View file @
2747bef2
...
...
@@ -195,6 +195,9 @@ static void spi_ocores_hw_xfer_tx_push8(struct spi_ocores *sp)
{
uint32_t
data
;
if
(
!
sp
->
cur_tx_buf
)
return
;
data
=
*
((
uint8_t
*
)
sp
->
cur_tx_buf
);
sp
->
cur_tx_buf
+=
1
;
spi_ocores_tx_set
(
sp
,
0
,
data
);
...
...
@@ -205,6 +208,9 @@ static void spi_ocores_hw_xfer_tx_push16(struct spi_ocores *sp)
{
uint32_t
data
;
if
(
!
sp
->
cur_tx_buf
)
return
;
data
=
*
((
uint16_t
*
)
sp
->
cur_tx_buf
);
sp
->
cur_tx_buf
+=
2
;
spi_ocores_tx_set
(
sp
,
0
,
data
);
...
...
@@ -215,6 +221,9 @@ static void spi_ocores_hw_xfer_tx_push32(struct spi_ocores *sp)
{
uint32_t
data
;
if
(
!
sp
->
cur_tx_buf
)
return
;
data
=
*
((
uint32_t
*
)
sp
->
cur_tx_buf
);
sp
->
cur_tx_buf
+=
4
;
spi_ocores_tx_set
(
sp
,
0
,
data
);
...
...
@@ -225,6 +234,9 @@ static void spi_ocores_hw_xfer_tx_push64(struct spi_ocores *sp)
{
int
i
;
if
(
!
sp
->
cur_tx_buf
)
return
;
for
(
i
=
0
;
i
<
2
;
++
i
)
{
uint32_t
data
;
...
...
@@ -239,6 +251,9 @@ static void spi_ocores_hw_xfer_tx_push128(struct spi_ocores *sp)
{
int
i
;
if
(
!
sp
->
cur_tx_buf
)
return
;
for
(
i
=
0
;
i
<
4
;
++
i
)
{
uint32_t
data
;
...
...
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