linux/drivers/net/ethernet/apm/xgene-v2/ring.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Applied Micro X-Gene SoC Ethernet v2 Driver
 *
 * Copyright (c) 2017, Applied Micro Circuits Corporation
 * Author(s): Iyappan Subramanian <[email protected]>
 *	      Keyur Chudgar <[email protected]>
 */

#ifndef __XGENE_ENET_V2_RING_H__
#define __XGENE_ENET_V2_RING_H__

#define XGENE_ENET_DESC_SIZE
#define XGENE_ENET_NUM_DESC
#define NUM_BUFS
#define SLOT_EMPTY

#define DMATXCTRL
#define DMATXDESCL
#define DMATXDESCH
#define DMATXSTATUS
#define DMARXCTRL
#define DMARXDESCL
#define DMARXDESCH
#define DMARXSTATUS
#define DMAINTRMASK
#define DMAINTERRUPT

#define D_POS
#define D_LEN
#define E_POS
#define E_LEN
#define PKT_ADDRL_POS
#define PKT_ADDRL_LEN
#define PKT_ADDRH_POS
#define PKT_ADDRH_LEN
#define PKT_SIZE_POS
#define PKT_SIZE_LEN
#define NEXT_DESC_ADDRL_POS
#define NEXT_DESC_ADDRL_LEN
#define NEXT_DESC_ADDRH_POS
#define NEXT_DESC_ADDRH_LEN

#define TXPKTCOUNT_POS
#define TXPKTCOUNT_LEN
#define RXPKTCOUNT_POS
#define RXPKTCOUNT_LEN

#define TX_PKT_SENT
#define TX_BUS_ERROR
#define RX_PKT_RCVD
#define RX_BUS_ERROR
#define RXSTATUS_RXPKTRCVD

struct xge_raw_desc {};

struct pkt_info {};

/* software context of a descriptor ring */
struct xge_desc_ring {};

static inline u64 xge_set_desc_bits(int pos, int len, u64 val)
{}

static inline u64 xge_get_desc_bits(int pos, int len, u64 src)
{}

#define SET_BITS(field, val)

#define GET_BITS(field, src)

void xge_setup_desc(struct xge_desc_ring *ring);
void xge_update_tx_desc_addr(struct xge_pdata *pdata);
void xge_update_rx_desc_addr(struct xge_pdata *pdata);
void xge_intr_enable(struct xge_pdata *pdata);
void xge_intr_disable(struct xge_pdata *pdata);

#endif  /* __XGENE_ENET_V2_RING_H__ */