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 XEON_PHI_DMA_SERVICE_H_ 11#define XEON_PHI_DMA_SERVICE_H_ 12 13#include <dma/dma.h> 14#include <dma/dma_device.h> 15 16/** 17 * \brief initializes the Xeon Phi DMA devices and the service 18 * 19 * \param phi Xeon Phi handle 20 * 21 * \returns SYS_ERR_OK on success 22 */ 23errval_t xdma_service_init(struct xeon_phi *phi); 24 25/** 26 * 27 */ 28static inline errval_t xdma_service_poll(struct xeon_phi *phi) 29{ 30 if (phi->dma) { 31 return dma_device_poll_channels(phi->dma); 32 } 33 return DMA_ERR_DEVICE_IDLE; 34} 35 36#endif /* XEON_PHI_DMA_SERVICE_H_ */ 37