linux/drivers/net/can/rcar/rcar_canfd.c

// SPDX-License-Identifier: GPL-2.0+
/* Renesas R-Car CAN FD device driver
 *
 * Copyright (C) 2015 Renesas Electronics Corp.
 */

/* The R-Car CAN FD controller can operate in either one of the below two modes
 *  - CAN FD only mode
 *  - Classical CAN (CAN 2.0) only mode
 *
 * This driver puts the controller in CAN FD only mode by default. In this
 * mode, the controller acts as a CAN FD node that can also interoperate with
 * CAN 2.0 nodes.
 *
 * To switch the controller to Classical CAN (CAN 2.0) only mode, add
 * "renesas,no-can-fd" optional property to the device tree node. A h/w reset is
 * also required to switch modes.
 *
 * Note: The h/w manual register naming convention is clumsy and not acceptable
 * to use as it is in the driver. However, those names are added as comments
 * wherever it is modified to a readable name.
 */

#include <linux/bitmap.h>
#include <linux/bitops.h>
#include <linux/can/dev.h>
#include <linux/clk.h>
#include <linux/errno.h>
#include <linux/ethtool.h>
#include <linux/interrupt.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/netdevice.h>
#include <linux/of.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/reset.h>
#include <linux/types.h>

#define RCANFD_DRV_NAME

/* Global register bits */

/* RSCFDnCFDGRMCFG */
#define RCANFD_GRMCFG_RCMC

/* RSCFDnCFDGCFG / RSCFDnGCFG */
#define RCANFD_GCFG_EEFE
#define RCANFD_GCFG_CMPOC
#define RCANFD_GCFG_DCS
#define RCANFD_GCFG_DCE
#define RCANFD_GCFG_TPRI

/* RSCFDnCFDGCTR / RSCFDnGCTR */
#define RCANFD_GCTR_TSRST
#define RCANFD_GCTR_CFMPOFIE
#define RCANFD_GCTR_THLEIE
#define RCANFD_GCTR_MEIE
#define RCANFD_GCTR_DEIE
#define RCANFD_GCTR_GSLPR
#define RCANFD_GCTR_GMDC_MASK
#define RCANFD_GCTR_GMDC_GOPM
#define RCANFD_GCTR_GMDC_GRESET
#define RCANFD_GCTR_GMDC_GTEST

/* RSCFDnCFDGSTS / RSCFDnGSTS */
#define RCANFD_GSTS_GRAMINIT
#define RCANFD_GSTS_GSLPSTS
#define RCANFD_GSTS_GHLTSTS
#define RCANFD_GSTS_GRSTSTS
/* Non-operational status */
#define RCANFD_GSTS_GNOPM

/* RSCFDnCFDGERFL / RSCFDnGERFL */
#define RCANFD_GERFL_EEF0_7
#define RCANFD_GERFL_EEF(ch)
#define RCANFD_GERFL_CMPOF
#define RCANFD_GERFL_THLES
#define RCANFD_GERFL_MES
#define RCANFD_GERFL_DEF

#define RCANFD_GERFL_ERR(gpriv, x)

/* AFL Rx rules registers */

/* RSCFDnCFDGAFLCFG0 / RSCFDnGAFLCFG0 */
#define RCANFD_GAFLCFG_SETRNC(gpriv, n, x)

#define RCANFD_GAFLCFG_GETRNC(gpriv, n, x)

/* RSCFDnCFDGAFLECTR / RSCFDnGAFLECTR */
#define RCANFD_GAFLECTR_AFLDAE
#define RCANFD_GAFLECTR_AFLPN(gpriv, x)

/* RSCFDnCFDGAFLIDj / RSCFDnGAFLIDj */
#define RCANFD_GAFLID_GAFLLB

/* RSCFDnCFDGAFLP1_j / RSCFDnGAFLP1_j */
#define RCANFD_GAFLP1_GAFLFDP(x)

/* Channel register bits */

/* RSCFDnCmCFG - Classical CAN only */
#define RCANFD_CFG_SJW(x)
#define RCANFD_CFG_TSEG2(x)
#define RCANFD_CFG_TSEG1(x)
#define RCANFD_CFG_BRP(x)

/* RSCFDnCFDCmNCFG - CAN FD only */
#define RCANFD_NCFG_NTSEG2(gpriv, x)

#define RCANFD_NCFG_NTSEG1(gpriv, x)

#define RCANFD_NCFG_NSJW(gpriv, x)

#define RCANFD_NCFG_NBRP(x)

/* RSCFDnCFDCmCTR / RSCFDnCmCTR */
#define RCANFD_CCTR_CTME
#define RCANFD_CCTR_ERRD
#define RCANFD_CCTR_BOM_MASK
#define RCANFD_CCTR_BOM_ISO
#define RCANFD_CCTR_BOM_BENTRY
#define RCANFD_CCTR_BOM_BEND
#define RCANFD_CCTR_TDCVFIE
#define RCANFD_CCTR_SOCOIE
#define RCANFD_CCTR_EOCOIE
#define RCANFD_CCTR_TAIE
#define RCANFD_CCTR_ALIE
#define RCANFD_CCTR_BLIE
#define RCANFD_CCTR_OLIE
#define RCANFD_CCTR_BORIE
#define RCANFD_CCTR_BOEIE
#define RCANFD_CCTR_EPIE
#define RCANFD_CCTR_EWIE
#define RCANFD_CCTR_BEIE
#define RCANFD_CCTR_CSLPR
#define RCANFD_CCTR_CHMDC_MASK
#define RCANFD_CCTR_CHDMC_COPM
#define RCANFD_CCTR_CHDMC_CRESET
#define RCANFD_CCTR_CHDMC_CHLT

/* RSCFDnCFDCmSTS / RSCFDnCmSTS */
#define RCANFD_CSTS_COMSTS
#define RCANFD_CSTS_RECSTS
#define RCANFD_CSTS_TRMSTS
#define RCANFD_CSTS_BOSTS
#define RCANFD_CSTS_EPSTS
#define RCANFD_CSTS_SLPSTS
#define RCANFD_CSTS_HLTSTS
#define RCANFD_CSTS_CRSTSTS

#define RCANFD_CSTS_TECCNT(x)
#define RCANFD_CSTS_RECCNT(x)

/* RSCFDnCFDCmERFL / RSCFDnCmERFL */
#define RCANFD_CERFL_ADERR
#define RCANFD_CERFL_B0ERR
#define RCANFD_CERFL_B1ERR
#define RCANFD_CERFL_CERR
#define RCANFD_CERFL_AERR
#define RCANFD_CERFL_FERR
#define RCANFD_CERFL_SERR
#define RCANFD_CERFL_ALF
#define RCANFD_CERFL_BLF
#define RCANFD_CERFL_OVLF
#define RCANFD_CERFL_BORF
#define RCANFD_CERFL_BOEF
#define RCANFD_CERFL_EPF
#define RCANFD_CERFL_EWF
#define RCANFD_CERFL_BEF

#define RCANFD_CERFL_ERR(x)

/* RSCFDnCFDCmDCFG */
#define RCANFD_DCFG_DSJW(gpriv, x)

#define RCANFD_DCFG_DTSEG2(gpriv, x)

#define RCANFD_DCFG_DTSEG1(gpriv, x)

#define RCANFD_DCFG_DBRP(x)

/* RSCFDnCFDCmFDCFG */
#define RCANFD_GEN4_FDCFG_CLOE
#define RCANFD_GEN4_FDCFG_FDOE
#define RCANFD_FDCFG_TDCE
#define RCANFD_FDCFG_TDCOC
#define RCANFD_FDCFG_TDCO(x)

/* RSCFDnCFDRFCCx */
#define RCANFD_RFCC_RFIM
#define RCANFD_RFCC_RFDC(x)
#define RCANFD_RFCC_RFPLS(x)
#define RCANFD_RFCC_RFIE
#define RCANFD_RFCC_RFE

/* RSCFDnCFDRFSTSx */
#define RCANFD_RFSTS_RFIF
#define RCANFD_RFSTS_RFMLT
#define RCANFD_RFSTS_RFFLL
#define RCANFD_RFSTS_RFEMP

/* RSCFDnCFDRFIDx */
#define RCANFD_RFID_RFIDE
#define RCANFD_RFID_RFRTR

/* RSCFDnCFDRFPTRx */
#define RCANFD_RFPTR_RFDLC(x)
#define RCANFD_RFPTR_RFPTR(x)
#define RCANFD_RFPTR_RFTS(x)

/* RSCFDnCFDRFFDSTSx */
#define RCANFD_RFFDSTS_RFFDF
#define RCANFD_RFFDSTS_RFBRS
#define RCANFD_RFFDSTS_RFESI

/* Common FIFO bits */

/* RSCFDnCFDCFCCk */
#define RCANFD_CFCC_CFTML(gpriv, x)
#define RCANFD_CFCC_CFM(gpriv, x)
#define RCANFD_CFCC_CFIM
#define RCANFD_CFCC_CFDC(gpriv, x)
#define RCANFD_CFCC_CFPLS(x)
#define RCANFD_CFCC_CFTXIE
#define RCANFD_CFCC_CFE

/* RSCFDnCFDCFSTSk */
#define RCANFD_CFSTS_CFMC(x)
#define RCANFD_CFSTS_CFTXIF
#define RCANFD_CFSTS_CFMLT
#define RCANFD_CFSTS_CFFLL
#define RCANFD_CFSTS_CFEMP

/* RSCFDnCFDCFIDk */
#define RCANFD_CFID_CFIDE
#define RCANFD_CFID_CFRTR
#define RCANFD_CFID_CFID_MASK(x)

/* RSCFDnCFDCFPTRk */
#define RCANFD_CFPTR_CFDLC(x)
#define RCANFD_CFPTR_CFPTR(x)
#define RCANFD_CFPTR_CFTS(x)

/* RSCFDnCFDCFFDCSTSk */
#define RCANFD_CFFDCSTS_CFFDF
#define RCANFD_CFFDCSTS_CFBRS
#define RCANFD_CFFDCSTS_CFESI

/* This controller supports either Classical CAN only mode or CAN FD only mode.
 * These modes are supported in two separate set of register maps & names.
 * However, some of the register offsets are common for both modes. Those
 * offsets are listed below as Common registers.
 *
 * The CAN FD only mode specific registers & Classical CAN only mode specific
 * registers are listed separately. Their register names starts with
 * RCANFD_F_xxx & RCANFD_C_xxx respectively.
 */

/* Common registers */

/* RSCFDnCFDCmNCFG / RSCFDnCmCFG */
#define RCANFD_CCFG(m)
/* RSCFDnCFDCmCTR / RSCFDnCmCTR */
#define RCANFD_CCTR(m)
/* RSCFDnCFDCmSTS / RSCFDnCmSTS */
#define RCANFD_CSTS(m)
/* RSCFDnCFDCmERFL / RSCFDnCmERFL */
#define RCANFD_CERFL(m)

/* RSCFDnCFDGCFG / RSCFDnGCFG */
#define RCANFD_GCFG
/* RSCFDnCFDGCTR / RSCFDnGCTR */
#define RCANFD_GCTR
/* RSCFDnCFDGCTS / RSCFDnGCTS */
#define RCANFD_GSTS
/* RSCFDnCFDGERFL / RSCFDnGERFL */
#define RCANFD_GERFL
/* RSCFDnCFDGTSC / RSCFDnGTSC */
#define RCANFD_GTSC
/* RSCFDnCFDGAFLECTR / RSCFDnGAFLECTR */
#define RCANFD_GAFLECTR
/* RSCFDnCFDGAFLCFG / RSCFDnGAFLCFG */
#define RCANFD_GAFLCFG(ch)
/* RSCFDnCFDRMNB / RSCFDnRMNB */
#define RCANFD_RMNB
/* RSCFDnCFDRMND / RSCFDnRMND */
#define RCANFD_RMND(y)

/* RSCFDnCFDRFCCx / RSCFDnRFCCx */
#define RCANFD_RFCC(gpriv, x)
/* RSCFDnCFDRFSTSx / RSCFDnRFSTSx */
#define RCANFD_RFSTS(gpriv, x)
/* RSCFDnCFDRFPCTRx / RSCFDnRFPCTRx */
#define RCANFD_RFPCTR(gpriv, x)

/* Common FIFO Control registers */

/* RSCFDnCFDCFCCx / RSCFDnCFCCx */
#define RCANFD_CFCC(gpriv, ch, idx)
/* RSCFDnCFDCFSTSx / RSCFDnCFSTSx */
#define RCANFD_CFSTS(gpriv, ch, idx)
/* RSCFDnCFDCFPCTRx / RSCFDnCFPCTRx */
#define RCANFD_CFPCTR(gpriv, ch, idx)

/* RSCFDnCFDFESTS / RSCFDnFESTS */
#define RCANFD_FESTS
/* RSCFDnCFDFFSTS / RSCFDnFFSTS */
#define RCANFD_FFSTS
/* RSCFDnCFDFMSTS / RSCFDnFMSTS */
#define RCANFD_FMSTS
/* RSCFDnCFDRFISTS / RSCFDnRFISTS */
#define RCANFD_RFISTS
/* RSCFDnCFDCFRISTS / RSCFDnCFRISTS */
#define RCANFD_CFRISTS
/* RSCFDnCFDCFTISTS / RSCFDnCFTISTS */
#define RCANFD_CFTISTS

/* RSCFDnCFDTMCp / RSCFDnTMCp */
#define RCANFD_TMC(p)
/* RSCFDnCFDTMSTSp / RSCFDnTMSTSp */
#define RCANFD_TMSTS(p)

/* RSCFDnCFDTMTRSTSp / RSCFDnTMTRSTSp */
#define RCANFD_TMTRSTS(y)
/* RSCFDnCFDTMTARSTSp / RSCFDnTMTARSTSp */
#define RCANFD_TMTARSTS(y)
/* RSCFDnCFDTMTCSTSp / RSCFDnTMTCSTSp */
#define RCANFD_TMTCSTS(y)
/* RSCFDnCFDTMTASTSp / RSCFDnTMTASTSp */
#define RCANFD_TMTASTS(y)
/* RSCFDnCFDTMIECy / RSCFDnTMIECy */
#define RCANFD_TMIEC(y)

/* RSCFDnCFDTXQCCm / RSCFDnTXQCCm */
#define RCANFD_TXQCC(m)
/* RSCFDnCFDTXQSTSm / RSCFDnTXQSTSm */
#define RCANFD_TXQSTS(m)
/* RSCFDnCFDTXQPCTRm / RSCFDnTXQPCTRm */
#define RCANFD_TXQPCTR(m)

/* RSCFDnCFDTHLCCm / RSCFDnTHLCCm */
#define RCANFD_THLCC(m)
/* RSCFDnCFDTHLSTSm / RSCFDnTHLSTSm */
#define RCANFD_THLSTS(m)
/* RSCFDnCFDTHLPCTRm / RSCFDnTHLPCTRm */
#define RCANFD_THLPCTR(m)

/* RSCFDnCFDGTINTSTS0 / RSCFDnGTINTSTS0 */
#define RCANFD_GTINTSTS0
/* RSCFDnCFDGTINTSTS1 / RSCFDnGTINTSTS1 */
#define RCANFD_GTINTSTS1
/* RSCFDnCFDGTSTCFG / RSCFDnGTSTCFG */
#define RCANFD_GTSTCFG
/* RSCFDnCFDGTSTCTR / RSCFDnGTSTCTR */
#define RCANFD_GTSTCTR
/* RSCFDnCFDGLOCKK / RSCFDnGLOCKK */
#define RCANFD_GLOCKK
/* RSCFDnCFDGRMCFG */
#define RCANFD_GRMCFG

/* RSCFDnCFDGAFLIDj / RSCFDnGAFLIDj */
#define RCANFD_GAFLID(offset, j)
/* RSCFDnCFDGAFLMj / RSCFDnGAFLMj */
#define RCANFD_GAFLM(offset, j)
/* RSCFDnCFDGAFLP0j / RSCFDnGAFLP0j */
#define RCANFD_GAFLP0(offset, j)
/* RSCFDnCFDGAFLP1j / RSCFDnGAFLP1j */
#define RCANFD_GAFLP1(offset, j)

/* Classical CAN only mode register map */

/* RSCFDnGAFLXXXj offset */
#define RCANFD_C_GAFL_OFFSET

/* RSCFDnRMXXXq -> RCANFD_C_RMXXX(q) */
#define RCANFD_C_RMID(q)
#define RCANFD_C_RMPTR(q)
#define RCANFD_C_RMDF0(q)
#define RCANFD_C_RMDF1(q)

/* RSCFDnRFXXx -> RCANFD_C_RFXX(x) */
#define RCANFD_C_RFOFFSET
#define RCANFD_C_RFID(x)
#define RCANFD_C_RFPTR(x)
#define RCANFD_C_RFDF(x, df)

/* RSCFDnCFXXk -> RCANFD_C_CFXX(ch, k) */
#define RCANFD_C_CFOFFSET

#define RCANFD_C_CFID(ch, idx)

#define RCANFD_C_CFPTR(ch, idx)

#define RCANFD_C_CFDF(ch, idx, df)

/* RSCFDnTMXXp -> RCANFD_C_TMXX(p) */
#define RCANFD_C_TMID(p)
#define RCANFD_C_TMPTR(p)
#define RCANFD_C_TMDF0(p)
#define RCANFD_C_TMDF1(p)

/* RSCFDnTHLACCm */
#define RCANFD_C_THLACC(m)
/* RSCFDnRPGACCr */
#define RCANFD_C_RPGACC(r)

/* R-Car Gen4 Classical and CAN FD mode specific register map */
#define RCANFD_GEN4_FDCFG(m)

#define RCANFD_GEN4_GAFL_OFFSET

/* CAN FD mode specific register map */

/* RSCFDnCFDCmXXX -> RCANFD_F_XXX(m) */
#define RCANFD_F_DCFG(gpriv, m)
#define RCANFD_F_CFDCFG(m)
#define RCANFD_F_CFDCTR(m)
#define RCANFD_F_CFDSTS(m)
#define RCANFD_F_CFDCRC(m)

/* RSCFDnCFDGAFLXXXj offset */
#define RCANFD_F_GAFL_OFFSET

/* RSCFDnCFDRMXXXq -> RCANFD_F_RMXXX(q) */
#define RCANFD_F_RMID(q)
#define RCANFD_F_RMPTR(q)
#define RCANFD_F_RMFDSTS(q)
#define RCANFD_F_RMDF(q, b)

/* RSCFDnCFDRFXXx -> RCANFD_F_RFXX(x) */
#define RCANFD_F_RFOFFSET(gpriv)
#define RCANFD_F_RFID(gpriv, x)
#define RCANFD_F_RFPTR(gpriv, x)
#define RCANFD_F_RFFDSTS(gpriv, x)
#define RCANFD_F_RFDF(gpriv, x, df)

/* RSCFDnCFDCFXXk -> RCANFD_F_CFXX(ch, k) */
#define RCANFD_F_CFOFFSET(gpriv)

#define RCANFD_F_CFID(gpriv, ch, idx)

#define RCANFD_F_CFPTR(gpriv, ch, idx)

#define RCANFD_F_CFFDCSTS(gpriv, ch, idx)

#define RCANFD_F_CFDF(gpriv, ch, idx, df)

/* RSCFDnCFDTMXXp -> RCANFD_F_TMXX(p) */
#define RCANFD_F_TMID(p)
#define RCANFD_F_TMPTR(p)
#define RCANFD_F_TMFDCTR(p)
#define RCANFD_F_TMDF(p, b)

/* RSCFDnCFDTHLACCm */
#define RCANFD_F_THLACC(m)
/* RSCFDnCFDRPGACCr */
#define RCANFD_F_RPGACC(r)

/* Constants */
#define RCANFD_FIFO_DEPTH
#define RCANFD_NAPI_WEIGHT

#define RCANFD_NUM_CHANNELS
#define RCANFD_CHANNELS_MASK

#define RCANFD_GAFL_PAGENUM(entry)
#define RCANFD_CHANNEL_NUMRULES

/* Rx FIFO is a global resource of the controller. There are 8 such FIFOs
 * available. Each channel gets a dedicated Rx FIFO (i.e.) the channel
 * number is added to RFFIFO index.
 */
#define RCANFD_RFFIFO_IDX

/* Tx/Rx or Common FIFO is a per channel resource. Each channel has 3 Common
 * FIFOs dedicated to them. Use the first (index 0) FIFO out of the 3 for Tx.
 */
#define RCANFD_CFFIFO_IDX

struct rcar_canfd_global;

struct rcar_canfd_hw_info {};

/* Channel priv data */
struct rcar_canfd_channel {};

/* Global priv data */
struct rcar_canfd_global {};

/* CAN FD mode nominal rate constants */
static const struct can_bittiming_const rcar_canfd_nom_bittiming_const =;

/* CAN FD mode data rate constants */
static const struct can_bittiming_const rcar_canfd_data_bittiming_const =;

/* Classical CAN mode bitrate constants */
static const struct can_bittiming_const rcar_canfd_bittiming_const =;

static const struct rcar_canfd_hw_info rcar_gen3_hw_info =;

static const struct rcar_canfd_hw_info rcar_gen4_hw_info =;

static const struct rcar_canfd_hw_info rzg2l_hw_info =;

/* Helper functions */
static inline bool is_gen4(struct rcar_canfd_global *gpriv)
{}

static inline u32 reg_gen4(struct rcar_canfd_global *gpriv,
			   u32 gen4, u32 not_gen4)
{}

static inline void rcar_canfd_update(u32 mask, u32 val, u32 __iomem *reg)
{}

static inline u32 rcar_canfd_read(void __iomem *base, u32 offset)
{}

static inline void rcar_canfd_write(void __iomem *base, u32 offset, u32 val)
{}

static void rcar_canfd_set_bit(void __iomem *base, u32 reg, u32 val)
{}

static void rcar_canfd_clear_bit(void __iomem *base, u32 reg, u32 val)
{}

static void rcar_canfd_update_bit(void __iomem *base, u32 reg,
				  u32 mask, u32 val)
{}

static void rcar_canfd_get_data(struct rcar_canfd_channel *priv,
				struct canfd_frame *cf, u32 off)
{}

static void rcar_canfd_put_data(struct rcar_canfd_channel *priv,
				struct canfd_frame *cf, u32 off)
{}

static void rcar_canfd_tx_failure_cleanup(struct net_device *ndev)
{}

static void rcar_canfd_set_mode(struct rcar_canfd_global *gpriv)
{}

static int rcar_canfd_reset_controller(struct rcar_canfd_global *gpriv)
{}

static void rcar_canfd_configure_controller(struct rcar_canfd_global *gpriv)
{}

static void rcar_canfd_configure_afl_rules(struct rcar_canfd_global *gpriv,
					   u32 ch)
{}

static void rcar_canfd_configure_rx(struct rcar_canfd_global *gpriv, u32 ch)
{}

static void rcar_canfd_configure_tx(struct rcar_canfd_global *gpriv, u32 ch)
{}

static void rcar_canfd_enable_global_interrupts(struct rcar_canfd_global *gpriv)
{}

static void rcar_canfd_disable_global_interrupts(struct rcar_canfd_global
						 *gpriv)
{}

static void rcar_canfd_enable_channel_interrupts(struct rcar_canfd_channel
						 *priv)
{}

static void rcar_canfd_disable_channel_interrupts(struct rcar_canfd_channel
						  *priv)
{}

static void rcar_canfd_global_error(struct net_device *ndev)
{}

static void rcar_canfd_error(struct net_device *ndev, u32 cerfl,
			     u16 txerr, u16 rxerr)
{}

static void rcar_canfd_tx_done(struct net_device *ndev)
{}

static void rcar_canfd_handle_global_err(struct rcar_canfd_global *gpriv, u32 ch)
{}

static irqreturn_t rcar_canfd_global_err_interrupt(int irq, void *dev_id)
{}

static void rcar_canfd_handle_global_receive(struct rcar_canfd_global *gpriv, u32 ch)
{}

static irqreturn_t rcar_canfd_global_receive_fifo_interrupt(int irq, void *dev_id)
{}

static irqreturn_t rcar_canfd_global_interrupt(int irq, void *dev_id)
{}

static void rcar_canfd_state_change(struct net_device *ndev,
				    u16 txerr, u16 rxerr)
{}

static void rcar_canfd_handle_channel_tx(struct rcar_canfd_global *gpriv, u32 ch)
{}

static irqreturn_t rcar_canfd_channel_tx_interrupt(int irq, void *dev_id)
{}

static void rcar_canfd_handle_channel_err(struct rcar_canfd_global *gpriv, u32 ch)
{}

static irqreturn_t rcar_canfd_channel_err_interrupt(int irq, void *dev_id)
{}

static irqreturn_t rcar_canfd_channel_interrupt(int irq, void *dev_id)
{}

static void rcar_canfd_set_bittiming(struct net_device *dev)
{}

static int rcar_canfd_start(struct net_device *ndev)
{}

static int rcar_canfd_open(struct net_device *ndev)
{}

static void rcar_canfd_stop(struct net_device *ndev)
{}

static int rcar_canfd_close(struct net_device *ndev)
{}

static netdev_tx_t rcar_canfd_start_xmit(struct sk_buff *skb,
					 struct net_device *ndev)
{}

static void rcar_canfd_rx_pkt(struct rcar_canfd_channel *priv)
{}

static int rcar_canfd_rx_poll(struct napi_struct *napi, int quota)
{}

static int rcar_canfd_do_set_mode(struct net_device *ndev, enum can_mode mode)
{}

static int rcar_canfd_get_berr_counter(const struct net_device *dev,
				       struct can_berr_counter *bec)
{}

static const struct net_device_ops rcar_canfd_netdev_ops =;

static const struct ethtool_ops rcar_canfd_ethtool_ops =;

static int rcar_canfd_channel_probe(struct rcar_canfd_global *gpriv, u32 ch,
				    u32 fcan_freq, struct phy *transceiver)
{}

static void rcar_canfd_channel_remove(struct rcar_canfd_global *gpriv, u32 ch)
{}

static int rcar_canfd_probe(struct platform_device *pdev)
{}

static void rcar_canfd_remove(struct platform_device *pdev)
{}

static int __maybe_unused rcar_canfd_suspend(struct device *dev)
{}

static int __maybe_unused rcar_canfd_resume(struct device *dev)
{}

static SIMPLE_DEV_PM_OPS(rcar_canfd_pm_ops, rcar_canfd_suspend,
			 rcar_canfd_resume);

static const __maybe_unused struct of_device_id rcar_canfd_of_table[] =;

MODULE_DEVICE_TABLE(of, rcar_canfd_of_table);

static struct platform_driver rcar_canfd_driver =;

module_platform_driver();

MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_DESCRIPTION();
MODULE_ALIAS();