HomeFreeBSD

Tune xDMA interface slightly:

Description

Tune xDMA interface slightly:
o Move descriptors allocation to DMA engine driver
o Add generic xdma_request() routine
o Add less-generic scatter-gather application based on xdma interface

Typical operation flow in peripheral device driver is:

  1. Get xDMA controller

sc->xdma_tx = xdma_ofw_get(sc->dev, "tx");

  1. Allocate virtual channel

sc->xchan_tx = xdma_channel_alloc(sc->xdma_tx, caps);

  1. Setup transfer status callback

xdma_setup_intr(sc->xchan_tx, my_tx_intr, sc, &sc->ih_tx);

  1. Request a transfer(s)

ret = xdma_request(sc->xchan_tx, &req);

  1. Free the channel

xdma_channel_free(sc->xdma_tx);

  1. Free the controller

xdma_put(sc->xdma_tx);

Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14971

Details

Provenance
brAuthored on
Differential Revision
D14971: DMA abstraction layer xDMA
Parents
rS332434: Add ld emulation types for hard-float mipses.
Branches
Unknown
Tags
Unknown