DMA Linux Sequential Implementation API

group aml_dma_linux_seq

Sequential DMA implementation.

DMA logic implemented based on general linux API, with the caller thread used as the only execution thread. This DMA implementation moves between pointers allocated with an aml_area_linux.

Defines

AML_DMA_LINUX_SEQ_DECL(name)

Static declaration of aml_dma_linux_seq structure.

AML_DMA_LINUX_SEQ_ALLOCSIZE

Static declaration aml_dma_linux_seq structure size

Functions

int aml_dma_linux_seq_create(struct aml_dma **dma, size_t nbreqs)

Allocates and initializes a new sequential DMA.

Return

0 if successful; an error code otherwise.

Parameters
  • dma: an address where the pointer to the newly allocated DMA structure will be stored.

  • nbreqs: the initial number of slots for asynchronous requests that are in-flight (will be increased automatically if necessary).

int aml_dma_linux_seq_init(struct aml_dma *dma, size_t nbreqs)

Initializes a new sequential DMA.

Return

0 if successful; an error code otherwise.

Parameters
  • dma: a pointer to a dma declared with the AML_DMA_LINUX_SEQ_DECL macro

  • nbreqs: same as the create version.

void aml_dma_linux_seq_fini(struct aml_dma *dma)

Finalize a sequential DMA

void aml_dma_linux_seq_destroy(struct aml_dma **dma)

Tears down a sequential DMA created with aml_dma_linux_seq_create.

Parameters
  • dma: the address of a pointer to a sequential dma. Will be NULL after.

int aml_dma_linux_seq_do_copy(struct aml_dma_linux_seq_data *dma, struct aml_dma_request_linux_seq *req)

Performs a copy request.

Return

0 if successful; an error code otherwise.

Parameters
  • dma: the dma_linux_seq_data associated with a linux_seq dma.

  • req: a valid linux_seq request.

Variables

struct aml_dma_ops aml_dma_linux_seq_ops

Default table of dma request operations for linux sequential dma.

struct aml_dma_request_linux_seq
#include <linux-seq.h>

Inside of a sequential request for linux movement.

struct aml_dma_linux_seq_data
#include <linux-seq.h>

Inner data of sequential linux aml_dma implementation

struct aml_dma_linux_seq_ops
#include <linux-seq.h>

Declaration of available linux sequential dma operations

struct aml_dma_linux_seq
#include <linux-seq.h>

aml_dma structure for linux based, sequential dma movement. Needs to be initialized with aml_dma_linux_seq_init(). Can be passed to generic aml_dma_*() functions.