Page MenuHomeFreeBSD

DMA abstaction layer aka xDMA
ClosedPublic

Authored by br on Dec 15 2016, 3:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 1:01 PM
Unknown Object (File)
Fri, Nov 8, 5:40 PM
Unknown Object (File)
Tue, Oct 29, 2:31 AM
Unknown Object (File)
Oct 1 2024, 1:16 AM
Unknown Object (File)
Sep 30 2024, 3:13 PM
Unknown Object (File)
Sep 24 2024, 1:13 PM
Unknown Object (File)
Sep 20 2024, 9:46 AM
Unknown Object (File)
Sep 6 2024, 11:25 AM
Subscribers

Details

Summary

Ideas for improvement:

  1. SoftDMA - when we have no real dma yet, but already want to use xDMA
  2. Introduce capabilites, so xDMA knows what the transfer types supported by hardware DMA controller, how many data can be copied by single descriptor, etc.
  3. Callback provided with some information, e.g. how many data were actually copied and any errors occurred during transfer
  4. Scatter-Gathering transfer type (WIP)
  5. Non-FDT setup, i.e. real dma controller register itself to xDMA
  6. Might be useful to have xdma interrupt thread, so callbacks can be optionally provided not in the interrupt time, but after
  7. Requests enqueuing support ? not sure if we need that

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

br retitled this revision from to DMA abstaction layer aka xDMA.
br updated this object.
br edited the test plan for this revision. (Show Details)
br added a reviewer: kan.

I've found a couple of typos in comments.

sys/dev/xdma/xdma.c
422

s/decsriptors/descriptors/

469

s/decsriptors/descriptors/

sys/dev/xdma/xdma_fdt_test.c
311

s/succeded/succeeded/

fix typos repored by bcr@
add man page

br added a reviewer: imp.
br updated this object.
sys/dev/xdma/xdma_if.m
66

I think this should be pcell_t

Thinking about this some more. For Allwinner (ARM) we have a private sunxi_dma_if that is used. The config structure has some additional fields:

struct sunxi_dma_config {
	unsigned int dst_width;
	unsigned int dst_burst_len;
	unsigned int dst_drqtype;
	bool dst_noincr;
	unsigned int dst_blksize;	/* DDMA-only */
	unsigned int dst_wait_cyc;	/* DDMA-only */
	unsigned int src_width;
	unsigned int src_burst_len;
	unsigned int src_drqtype;
	bool src_noincr;
	unsigned int src_blksize;	/* DDMA-only */
	unsigned int src_wait_cyc;	/* DDMA-only */
};

Is the expectation that as more fields are required we will grow xdma_channel_config?

Is the expectation that as more fields are required we will grow xdma_channel_config?

Sure! we can grow any time if required.

br edited edge metadata.

use pcell_t instead of phandle_t asnoticed by jmcneill@

sys/dev/xdma/xdma_if.m
66

you right, thanks !

This revision was automatically updated to reflect the committed changes.