1/* 2 * Copyright (c) 2014 ETH Zurich. 3 * All rights reserved. 4 * 5 * This file is distributed under the terms in the attached LICENSE file. 6 * If you do not find this file, copies can be found by writing to: 7 * ETH Zurich D-INFK, Universitaetsstrasse 6, CH-8092 Zurich. Attn: Systems Group. 8 */ 9 10#ifndef IOAT_DMA_CHANNEL_INTERNAL_H 11#define IOAT_DMA_CHANNEL_INTERNAL_H 12 13#include <dma_channel_internal.h> 14#include <dma/ioat/ioat_dma_channel.h> 15 16 17 18/** 19 * \brief initializes and allocates resources for a new channel DMA channel 20 * belonging to a device 21 * 22 * \param dev IOAT DMA device 23 * \param id id of this channel 24 * \param max_xfer maximum size in bytes for a transfer 25 * \param ret_chan returned channel pointer 26 * 27 * \returns SYS_ERR_OK on success 28 */ 29errval_t ioat_dma_channel_init(struct ioat_dma_device *dev, 30 uint8_t id, 31 uint32_t max_xfer, 32 struct ioat_dma_channel **ret_chan); 33 34/** 35 * \brief enqueues a request onto the IOAT DMA channel and submits it to the 36 * hardware 37 * 38 * \param chan IOAT DMA channel 39 * \param req IOAT DMA request to be submitted 40 * 41 * \returns SYS_ERR_OK on success 42 * DMA_ERR_* on failure 43 */ 44errval_t ioat_dma_channel_submit_request(struct ioat_dma_channel *chan, 45 struct ioat_dma_request *req); 46 47/** 48 * \brief initializes the MSI-X interrupts for the channel 49 */ 50errval_t ioat_dma_channel_irq_setup_msix(struct ioat_dma_channel *chan); 51 52#endif /* IOAT_DMA_CHANNEL_INTERNAL_H */ 53