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
1bbd99f7
Commit
1bbd99f7
authored
Aug 30, 2019
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:drv:spi: move length update in rx_pop()
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
79c2a2f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
spi-ocores.c
software/kernel/spi-ocores.c
+8
-8
No files found.
software/kernel/spi-ocores.c
View file @
1bbd99f7
...
...
@@ -349,7 +349,15 @@ static void spi_ocores_hw_xfer_rx_pop128(struct spi_ocores *sp)
static
void
spi_ocores_hw_xfer_rx_pop
(
struct
spi_ocores
*
sp
)
{
uint8_t
nbits
;
sp
->
cur_rx_pop
(
sp
);
/*
* When we read is because a complete HW transfer is over, so we
* can safely decrease the counter of pending bytes
*/
nbits
=
spi_ocores_hw_xfer_bits_per_word
(
sp
);
sp
->
cur_len
-=
(
nbits
/
8
);
/* FIXME not working for !pow2 */
}
static
void
spi_ocores_hw_xfer_start
(
struct
spi_ocores
*
sp
)
...
...
@@ -567,19 +575,11 @@ static void spi_ocores_finalize_current_message(struct spi_ocores *sp)
static
int
spi_ocores_process
(
struct
spi_ocores
*
sp
)
{
uint32_t
ctrl
=
sp
->
read
(
sp
,
SPI_OCORES_CTRL
);
uint8_t
nbits
;
if
(
ctrl
&
SPI_OCORES_CTRL_BUSY
)
return
-
ENODATA
;
spi_ocores_hw_xfer_rx_pop
(
sp
);
/*
* When we read is because a complete HW transfer is over, so we
* can safely decrease the counter of pending bytes
*/
nbits
=
spi_ocores_hw_xfer_bits_per_word
(
sp
);
sp
->
cur_len
-=
(
nbits
/
8
);
/* FIXME not working for !pow2 */
if
(
spi_ocores_sw_xfer_pending
(
sp
))
{
spi_ocores_hw_xfer_tx_push
(
sp
);
spi_ocores_hw_xfer_start
(
sp
);
...
...
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