linux/drivers/net/ethernet/renesas/ravb.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Renesas Ethernet AVB device driver
 *
 * Copyright (C) 2014-2015 Renesas Electronics Corporation
 * Copyright (C) 2015 Renesas Solutions Corp.
 * Copyright (C) 2015-2016 Cogent Embedded, Inc. <[email protected]>
 *
 * Based on the SuperH Ethernet driver
 */

#ifndef __RAVB_H__
#define __RAVB_H__

#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/mdio-bitbang.h>
#include <linux/netdevice.h>
#include <linux/phy.h>
#include <linux/platform_device.h>
#include <linux/ptp_clock_kernel.h>
#include <net/page_pool/types.h>

#define BE_TX_RING_SIZE
#define BE_RX_RING_SIZE
#define NC_TX_RING_SIZE
#define NC_RX_RING_SIZE
#define BE_TX_RING_MIN
#define BE_RX_RING_MIN
#define BE_TX_RING_MAX
#define BE_RX_RING_MAX

#define PKT_BUF_SZ

/* Driver's parameters */
#define RAVB_ALIGN

/* Hardware time stamp */
#define RAVB_TXTSTAMP_VALID
#define RAVB_TXTSTAMP_ENABLED

#define RAVB_RXTSTAMP_VALID
#define RAVB_RXTSTAMP_TYPE
#define RAVB_RXTSTAMP_TYPE_V2_L2_EVENT
#define RAVB_RXTSTAMP_TYPE_ALL
#define RAVB_RXTSTAMP_ENABLED

enum ravb_reg {};


/* Register bits of the Ethernet AVB */
/* CCC */
enum CCC_BIT {};

/* CSR */
enum CSR_BIT {};

/* ESR */
enum ESR_BIT {};

/* APSR (R-Car Gen3 only) */
enum APSR_BIT {};

/* RCR */
enum RCR_BIT {};

/* RQC0/1/2/3/4 */
enum RQC_BIT {};

/* RPC */
enum RPC_BIT {};

/* UFCW */
enum UFCW_BIT {};

/* UFCS */
enum UFCS_BIT {};

/* UFCV0/1/2/3/4 */
enum UFCV_BIT {};

/* UFCD0/1/2/3/4 */
enum UFCD_BIT {};

/* SFO */
enum SFO_BIT {};

/* RTC */
enum RTC_BIT {};

/* TGC */
enum TGC_BIT {};

/* TCCR */
enum TCCR_BIT {};

/* TSR */
enum TSR_BIT {};

/* TFA2 */
enum TFA2_BIT {};

/* DIC */
enum DIC_BIT {};

/* DIS */
enum DIS_BIT {};

/* EIC */
enum EIC_BIT {};

/* EIS */
enum EIS_BIT {};

/* RIC0 */
enum RIC0_BIT {};

/* RIC0 */
enum RIS0_BIT {};

/* RIC1 */
enum RIC1_BIT {};

/* RIS1 */
enum RIS1_BIT {};

/* RIC2 */
enum RIC2_BIT {};

/* RIS2 */
enum RIS2_BIT {};

/* TIC */
enum TIC_BIT {};

/* TIS */
enum TIS_BIT {};

/* ISS */
enum ISS_BIT {};

/* CIE (R-Car Gen3 only) */
enum CIE_BIT {};

/* GCCR */
enum GCCR_BIT {};

/* GTI */
enum GTI_BIT {};

#define GTI_TIV_MAX
#define GTI_TIV_MIN

/* GIC */
enum GIC_BIT {};

/* GIS */
enum GIS_BIT {};

/* GIE (R-Car Gen3 only) */
enum GIE_BIT {};

/* GID (R-Car Gen3 only) */
enum GID_BIT {};

/* RIE0 (R-Car Gen3 only) */
enum RIE0_BIT {};

/* RID0 (R-Car Gen3 only) */
enum RID0_BIT {};

/* RIE2 (R-Car Gen3 only) */
enum RIE2_BIT {};

/* RID2 (R-Car Gen3 only) */
enum RID2_BIT {};

/* TIE (R-Car Gen3 only) */
enum TIE_BIT {};

/* TID (R-Car Gen3 only) */
enum TID_BIT {};

/* ECMR */
enum ECMR_BIT {};

/* ECSR */
enum ECSR_BIT {};

/* ECSIPR */
enum ECSIPR_BIT {};

/* PIR */
enum PIR_BIT {};

/* PSR */
enum PSR_BIT {};

/* PIPR */
enum PIPR_BIT {};

/* MPR */
enum MPR_BIT {};

/* GECMR */
enum GECMR_BIT {};

/* The Ethernet AVB descriptor definitions. */
struct ravb_desc {};

#define DPTR_ALIGN

enum DIE_DT {};

struct ravb_rx_desc {};

struct ravb_ex_rx_desc {};

enum RX_DS_CC_BIT {};

/* E-MAC status code */
enum MSC_BIT {};

struct ravb_tx_desc {};

enum TX_DS_TAGL_BIT {};

enum TX_TAGH_TSR_BIT {};
enum RAVB_QUEUE {};

enum CXR31_BIT {};

enum CXR35_BIT {};

enum CSR0_BIT {};

enum CSR1_BIT {};

enum CSR2_BIT {};

#define DBAT_ENTRY_NUM
#define RX_QUEUE_OFFSET
#define NUM_RX_QUEUE
#define NUM_TX_QUEUE

struct ravb_tstamp_skb {};

struct ravb_ptp_perout {};

#define N_EXT_TS
#define N_PER_OUT

struct ravb_ptp {};

struct ravb_hw_info {};

struct ravb_rx_buffer {};

struct ravb_private {};

static inline u32 ravb_read(struct net_device *ndev, enum ravb_reg reg)
{}

static inline void ravb_write(struct net_device *ndev, u32 data,
			      enum ravb_reg reg)
{}

void ravb_modify(struct net_device *ndev, enum ravb_reg reg, u32 clear,
		 u32 set);
int ravb_wait(struct net_device *ndev, enum ravb_reg reg, u32 mask, u32 value);

void ravb_ptp_interrupt(struct net_device *ndev);
void ravb_ptp_init(struct net_device *ndev, struct platform_device *pdev);
void ravb_ptp_stop(struct net_device *ndev);

#endif	/* #ifndef __RAVB_H__ */