linux/drivers/net/ethernet/tehuti/tn40.h

/* SPDX-License-Identifier: GPL-2.0+ */
/* Copyright (c) Tehuti Networks Ltd. */

#ifndef _TN40_H_
#define _TN40_H_

#include "tn40_regs.h"

#define TN40_DRV_NAME

#define TN40_MDIO_SPEED_1MHZ
#define TN40_MDIO_SPEED_6MHZ

/* netdev tx queue len for Luxor. The default value is 1000.
 * ifconfig eth1 txqueuelen 3000 - to change it at runtime.
 */
#define TN40_NDEV_TXQ_LEN

#define TN40_FIFO_SIZE
#define TN40_FIFO_EXTRA_SPACE

#define TN40_TXF_DESC_SZ
#define TN40_MAX_TX_LEVEL
#define TN40_MIN_TX_LEVEL
#define TN40_NO_UPD_PACKETS
#define TN40_MAX_MTU

#define TN40_PCK_TH_MULT
#define TN40_INT_COAL_MULT

#define TN40_INT_REG_VAL(coal, coal_rc, rxf_th, pck_th)

struct tn40_fifo {};

struct tn40_txf_fifo {};

struct tn40_txd_fifo {};

struct tn40_rxf_fifo {};

struct tn40_rxd_fifo {};

struct tn40_rx_map {};

struct tn40_rxdb {};

tn40_tx_dma_addr;

/* Entry in the db.
 * if len == 0 addr is dma
 * if len != 0 addr is skb
 */
struct tn40_tx_map {};

/* tx database - implemented as circular fifo buffer */
struct tn40_txdb {};

struct tn40_priv {};

/* RX FREE descriptor - 64bit */
struct tn40_rxf_desc {};

#define TN40_GET_RXD_BC(x)
#define TN40_GET_RXD_ERR(x)
#define TN40_GET_RXD_PKT_ID(x)
#define TN40_GET_RXD_VTAG(x)
#define TN40_GET_RXD_VLAN_TCI(x)

struct tn40_rxd_desc {};

#define TN40_MAX_PBL
/* PBL describes each virtual buffer to be transmitted from the host. */
struct tn40_pbl {};

/* First word for TXD descriptor. It means: type = 3 for regular Tx packet,
 * hw_csum = 7 for IP+UDP+TCP HW checksums.
 */
#define TN40_TXD_W1_VAL(bc, checksum, vtag, lgsnd, vlan_id)

struct tn40_txd_desc {};

struct tn40_txf_desc {};

static inline u32 tn40_read_reg(struct tn40_priv *priv, u32 reg)
{}

static inline void tn40_write_reg(struct tn40_priv *priv, u32 reg, u32 val)
{}

int tn40_set_link_speed(struct tn40_priv *priv, u32 speed);

int tn40_mdiobus_init(struct tn40_priv *priv);

int tn40_phy_register(struct tn40_priv *priv);
void tn40_phy_unregister(struct tn40_priv *priv);

#endif /* _TN40XX_H */