linux/drivers/net/can/cc770/cc770.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Core driver for the CC770 and AN82527 CAN controllers
 *
 * Copyright (C) 2009, 2011 Wolfgang Grandegger <[email protected]>
 */

#ifndef CC770_DEV_H
#define CC770_DEV_H

#include <linux/can/dev.h>

struct cc770_msgobj {} __packed;

struct cc770_regs {} __packed;

/* Control Register (0x00) */
#define CTRL_INI
#define CTRL_IE
#define CTRL_SIE
#define CTRL_EIE
#define CTRL_EAF
#define CTRL_CCE

/* Status Register (0x01) */
#define STAT_LEC_STUFF
#define STAT_LEC_FORM
#define STAT_LEC_ACK
#define STAT_LEC_BIT1
#define STAT_LEC_BIT0
#define STAT_LEC_CRC
#define STAT_LEC_MASK
#define STAT_TXOK
#define STAT_RXOK
#define STAT_WAKE
#define STAT_WARN
#define STAT_BOFF

/*
 * CPU Interface Register (0x02)
 * Clock Out Register (0x1f)
 * Bus Configuration Register (0x2f)
 *
 * see include/linux/can/platform/cc770.h
 */

/* Message Control Register 0 (Base Address + 0x0) */
#define INTPND_RES
#define INTPND_SET
#define INTPND_UNC
#define RXIE_RES
#define RXIE_SET
#define RXIE_UNC
#define TXIE_RES
#define TXIE_SET
#define TXIE_UNC
#define MSGVAL_RES
#define MSGVAL_SET
#define MSGVAL_UNC

/* Message Control Register 1 (Base Address + 0x01) */
#define NEWDAT_RES
#define NEWDAT_SET
#define NEWDAT_UNC
#define MSGLST_RES
#define MSGLST_SET
#define MSGLST_UNC
#define CPUUPD_RES
#define CPUUPD_SET
#define CPUUPD_UNC
#define TXRQST_RES
#define TXRQST_SET
#define TXRQST_UNC
#define RMTPND_RES
#define RMTPND_SET
#define RMTPND_UNC

/* Message Configuration Register (Base Address + 0x06) */
#define MSGCFG_XTD
#define MSGCFG_DIR

#define MSGOBJ_FIRST
#define MSGOBJ_LAST

#define CC770_IO_SIZE
#define CC770_MAX_IRQ
#define CC770_MAX_MSG

#define CC770_ECHO_SKB_MAX

#define cc770_read_reg(priv, member)

#define cc770_write_reg(priv, member, value)

/*
 * Message objects and flags used by this driver
 */
#define CC770_OBJ_FLAG_RX
#define CC770_OBJ_FLAG_RTR
#define CC770_OBJ_FLAG_EFF

enum {};

#define obj2msgobj(o)

/*
 * CC770 private data structure
 */
struct cc770_priv {};

struct net_device *alloc_cc770dev(int sizeof_priv);
void free_cc770dev(struct net_device *dev);
int register_cc770dev(struct net_device *dev);
void unregister_cc770dev(struct net_device *dev);

#endif /* CC770_DEV_H */