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
6bf976cb
Commit
6bf976cb
authored
Jul 08, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw|doc: better explaination about the 4KiB write split
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
3164b2c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
sw-driver.rst
doc/sw-driver.rst
+6
-4
spec-core-fpga.c
software/kernel/spec-core-fpga.c
+2
-4
No files found.
doc/sw-driver.rst
View file @
6bf976cb
...
@@ -294,7 +294,9 @@ You can get the maximum transfer size by calling ``dma_get_max_seg_size()``.::
...
@@ -294,7 +294,9 @@ You can get the maximum transfer size by calling ``dma_get_max_seg_size()``.::
dma_get_max_seg_size(dchan->device->dev);
dma_get_max_seg_size(dchan->device->dev);
.. warning::
.. warning::
The GN4124 chip has a 4KiB payload. When doing a ``DMA_DEV_TO_MEM``
The HDL DMA engine implementation does not support very well
the HDL DMA engine splits transfers in 4KiB chunks, but for
``DMA_MEM_TO_DEV`` transfers. To overcome some bugs users must
``DMA_MEM_TO_DEV`` transfers the split should happen in the
split their transfers in 4KiB chunks.
driver: it does not happen. The DMA engine implementation
supports ``DMA_MEM_TO_DEV`` manly for testing purposes; to avoid
complications in the driver the 4KiB split is left to users.
software/kernel/spec-core-fpga.c
View file @
6bf976cb
...
@@ -172,10 +172,8 @@ static int spec_fpga_dbg_dma_transfer(struct spec_fpga_dbg_dma *dbgdma,
...
@@ -172,10 +172,8 @@ static int spec_fpga_dbg_dma_transfer(struct spec_fpga_dbg_dma *dbgdma,
dir
,
count
,
offset
);
dir
,
count
,
offset
);
/*
/*
* Compensate HDL limitation.
* The GN4124 chip has a 4KiB payload. For DMA_DEV_TO_MEM this is
* The gennum core has no DMA size limits for reading. Unfortunatelly,
* handled by the HDL core. For DMA_MEM_TO_DEV, the split is done here.
* the implementation is not symmetric and on write the limit is
* 4096 Bytes
*/
*/
if
(
dir
==
DMA_DEV_TO_MEM
)
if
(
dir
==
DMA_DEV_TO_MEM
)
max_segment
=
dma_get_max_seg_size
(
dbgdma
->
dchan
->
device
->
dev
);
max_segment
=
dma_get_max_seg_size
(
dbgdma
->
dchan
->
device
->
dev
);
...
...
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