linux/drivers/dma/amd/qdma/qdma.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * DMA header for AMD Queue-based DMA Subsystem
 *
 * Copyright (C) 2023-2024, Advanced Micro Devices, Inc.
 */

#ifndef __QDMA_H
#define __QDMA_H

#include <linux/bitfield.h>
#include <linux/dmaengine.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>

#include "../../virt-dma.h"

#define DISABLE
#define ENABLE

#define QDMA_MIN_IRQ
#define QDMA_INTR_NAME_MAX_LEN
#define QDMA_INTR_PREFIX

#define QDMA_IDENTIFIER
#define QDMA_DEFAULT_RING_SIZE
#define QDMA_DEFAULT_RING_ID
#define QDMA_POLL_INTRVL_US
#define QDMA_POLL_TIMEOUT_US
#define QDMA_DMAP_REG_STRIDE
#define QDMA_CTXT_REGMAP_LEN
#define QDMA_MM_DESC_SIZE
#define QDMA_MM_DESC_LEN_BITS
#define QDMA_MM_DESC_MAX_LEN
#define QDMA_MIN_DMA_ALLOC_SIZE
#define QDMA_INTR_RING_SIZE
#define QDMA_INTR_RING_IDX_MASK
#define QDMA_INTR_RING_BASE(_addr)

#define QDMA_IDENTIFIER_REGOFF
#define QDMA_IDENTIFIER_MASK
#define QDMA_QUEUE_ARM_BIT

#define qdma_err(qdev, fmt, args...)

#define qdma_dbg(qdev, fmt, args...)

#define qdma_info(qdev, fmt, args...)

enum qdma_reg_fields {};

enum qdma_regs {};

struct qdma_reg_field {};

struct qdma_reg {};

#define QDMA_REGF(_msb, _lsb)

#define QDMA_REGO(_off, _count)

enum qdma_desc_size {};

enum qdma_queue_op_mode {};

enum qdma_ctxt_type {};

enum qdma_ctxt_cmd {};

struct qdma_ctxt_sw_desc {};

struct qdma_ctxt_intr {};

struct qdma_ctxt_fmap {};

struct qdma_device;

struct qdma_mm_desc {} __packed;

struct qdma_mm_vdesc {};

#define QDMA_VDESC_QUEUED(vdesc)

struct qdma_queue {};

struct qdma_intr_ring {};

#define QDMA_INTR_MASK_PIDX
#define QDMA_INTR_MASK_CIDX
#define QDMA_INTR_MASK_DESC_COLOR
#define QDMA_INTR_MASK_STATE
#define QDMA_INTR_MASK_ERROR
#define QDMA_INTR_MASK_TYPE
#define QDMA_INTR_MASK_QID
#define QDMA_INTR_MASK_COLOR

struct qdma_device {};

extern const struct qdma_reg qdma_regos_default[QDMA_REGO_MAX];
extern const struct qdma_reg_field qdma_regfs_default[QDMA_REGF_MAX];

#endif	/* __QDMA_H */