Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ioat/ioat.h
Show All 28 Lines | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <machine/bus.h> | #include <machine/bus.h> | ||||
/* | /* | ||||
* This file defines the public interface to the IOAT driver. | * This file defines the public interface to the IOAT driver. | ||||
*/ | */ | ||||
/* | /* | ||||
* Enables an interrupt for this operation. Typically, you would only enable | * Enables an interrupt for this operation. Typically, you would only enable | ||||
* this on the last operation in a group | * this on the last operation in a group | ||||
*/ | */ | ||||
#define DMA_INT_EN 0x1 | #define DMA_INT_EN 0x1 | ||||
typedef void *bus_dmaengine_t; | typedef void *bus_dmaengine_t; | ||||
struct bus_dmadesc; | struct bus_dmadesc; | ||||
typedef void (*bus_dmaengine_callback_t)(void *arg); | typedef void (*bus_dmaengine_callback_t)(void *arg); | ||||
/* Called first to acquire a reference to the DMA channel */ | /* | ||||
* Called first to acquire a reference to the DMA channel | |||||
*/ | |||||
bus_dmaengine_t ioat_get_dmaengine(uint32_t channel_index); | bus_dmaengine_t ioat_get_dmaengine(uint32_t channel_index); | ||||
/* | /* | ||||
* Acquire must be called before issuing an operation to perform. Release is | * Acquire must be called before issuing an operation to perform. Release is | ||||
* called after. Multiple operations can be issued within the context of one | * called after. Multiple operations can be issued within the context of one | ||||
* acquire and release | * acquire and release | ||||
*/ | */ | ||||
void ioat_acquire(bus_dmaengine_t dmaengine); | void ioat_acquire(bus_dmaengine_t dmaengine); | ||||
void ioat_release(bus_dmaengine_t dmaengine); | void ioat_release(bus_dmaengine_t dmaengine); | ||||
/* Issues the copy data operation */ | /* Issues the copy data operation */ | ||||
struct bus_dmadesc *ioat_copy(bus_dmaengine_t dmaengine, bus_addr_t dst, | struct bus_dmadesc *ioat_copy(bus_dmaengine_t dmaengine, bus_addr_t dst, | ||||
bus_addr_t src, bus_size_t len, bus_dmaengine_callback_t callback_fn, | bus_addr_t src, bus_size_t len, bus_dmaengine_callback_t callback_fn, | ||||
Show All 12 Lines |