zephyr/drivers/dma/dma_xilinx_axi_dma.h
Eric Ackermann c9ce311aaa drivers: dma: Add Xilinx AXI DMA driver
The Xilinx AXI DMA Controller is commonly used in FPGA designs.
For example, it is a part of the 1G/2.5G AXI Ethernet subsystem.
This patch adds a driver for the Xilinx AXI DMA that supports
single MM2S and S2MM channels as well as the control and status
streams used by the AXI Ethernet subsystem.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2024-11-18 19:31:20 -05:00

29 lines
770 B
C

/** @file
* @brief Definitions and non-standard functions for Xilinx AXI DMA.
*/
/*
* Copyright (c) 2024 CISPA Helmholtz Center for Information Security gGmbH
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef DMA_XILINX_AXI_DMA_H
#define DMA_XILINX_AXI_DMA_H
#define XILINX_AXI_DMA_NUM_CHANNELS 2
#define XILINX_AXI_DMA_TX_CHANNEL_NUM 0
#define XILINX_AXI_DMA_RX_CHANNEL_NUM 1
#define XILINX_AXI_DMA_LINKED_CHANNEL_NO_CSUM_OFFLOAD 0x0
#define XILINX_AXI_DMA_LINKED_CHANNEL_FULL_CSUM_OFFLOAD 0x1
#include <stdint.h>
#include <zephyr/device.h>
/**
* @brief Returns the size of the last RX transfer conducted by the DMA, based on the descriptor
* status.
*/
extern uint32_t dma_xilinx_axi_dma_last_received_frame_length(const struct device *dev);
#endif