#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/ethtool.h>
#include <linux/platform_device.h>
#include <linux/netdevice.h>
#include <linux/can.h>
#include <linux/can/dev.h>
#include <linux/can/skb.h>
#include <linux/can/error.h>
#include <linux/mfd/janz.h>
#include <asm/io.h>
#define DPM_NUM_PAGES …
#define DPM_PAGE_SIZE …
#define DPM_PAGE_ADDR(p) …
#define QUEUE_OLD_CONTROL …
#define QUEUE_OLD_RB0 …
#define QUEUE_OLD_RB1 …
#define QUEUE_OLD_WB0 …
#define QUEUE_OLD_WB1 …
#define MSYNC_PEER …
#define MSYNC_LOCL …
#define TARGET_RUNNING …
#define FIRMWARE_STAMP …
#define MSYNC_RB0 …
#define MSYNC_RB1 …
#define MSYNC_RBLW …
#define MSYNC_RB_MASK …
#define MSYNC_WB0 …
#define MSYNC_WB1 …
#define MSYNC_WBLW …
#define MSYNC_WB_MASK …
#define QUEUE_TOHOST …
#define QUEUE_FROMHOST_MID …
#define QUEUE_FROMHOST_HIGH …
#define QUEUE_FROMHOST_LOW …
#define DPM_FREE_START …
#define DESC_VALID …
#define DESC_WRAP …
#define DESC_INTERRUPT …
#define DESC_IVALID …
#define DESC_LEN(len) …
#define MSG_CONNECTI …
#define MSG_DISCONNECT …
#define MSG_IDVERS …
#define MSG_MSGLOST …
#define MSG_NEWHOSTIF …
#define MSG_INQUIRY …
#define MSG_SETAFILMASK …
#define MSG_INITFDPMQUEUE …
#define MSG_HWCONF …
#define MSG_FMSGLOST …
#define MSG_CEVTIND …
#define MSG_CBTRREQ …
#define MSG_COFFREQ …
#define MSG_CONREQ …
#define MSG_CCONFREQ …
#define MSG_NMTS …
#define MSG_LMTS …
#define INQUIRY_STATUS …
#define INQUIRY_TERMINATION …
#define INQUIRY_EXTENDED …
#define SETAFILMASK_REJECT …
#define SETAFILMASK_FASTIF …
#define HWCONF_TERMINATE_ON …
#define HWCONF_TERMINATE_OFF …
#define CEVTIND_EI …
#define CEVTIND_DOI …
#define CEVTIND_LOST …
#define CEVTIND_FULL …
#define CEVTIND_BEI …
#define CEVTIND_CHIP_SJA1000 …
#define ICAN3_BUSERR_QUOTA_MAX …
#define ICAN3_SNGL …
#define ICAN3_ECHO …
#define ICAN3_EFF_RTR …
#define ICAN3_SFF_RTR …
#define ICAN3_EFF …
#define ICAN3_CAN_TYPE_MASK …
#define ICAN3_CAN_TYPE_SFF …
#define ICAN3_CAN_TYPE_EFF …
#define ICAN3_CAN_DLC_MASK …
#define NMTS_CREATE_NODE_REQ …
#define NMTS_SLAVE_STATE_IND …
#define NMTS_SLAVE_EVENT_IND …
#define LMTS_BUSON_REQ …
#define LMTS_BUSOFF_REQ …
#define LMTS_CAN_CONF_REQ …
#define NE_LOCAL_OCCURRED …
#define NE_LOCAL_RESOLVED …
#define NE_REMOTE_OCCURRED …
#define NE_REMOTE_RESOLVED …
#define SR_BS …
#define SR_ES …
#define SR_TS …
#define SR_RS …
#define SR_TCS …
#define SR_TBS …
#define SR_DOS …
#define SR_RBS …
#define SR_CRIT …
#define ECC_SEG …
#define ECC_DIR …
#define ECC_ERR …
#define ECC_BIT …
#define ECC_FORM …
#define ECC_STUFF …
#define ECC_MASK …
#define ICAN3_NEW_BUFFERS …
#define ICAN3_TX_BUFFERS …
#define ICAN3_RX_BUFFERS …
#define ICAN3_CAN_CLOCK …
enum ican3_fwtype { … };
#define DRV_NAME …
struct ican3_dpm_control { … };
struct ican3_dev { … };
struct ican3_msg { … };
struct ican3_new_desc { … };
struct ican3_fast_desc { … };
static inline void ican3_set_page(struct ican3_dev *mod, unsigned int page)
{ … }
static int ican3_old_recv_msg(struct ican3_dev *mod, struct ican3_msg *msg)
{ … }
static int ican3_old_send_msg(struct ican3_dev *mod, struct ican3_msg *msg)
{ … }
static void ican3_init_new_host_interface(struct ican3_dev *mod)
{ … }
static void ican3_init_fast_host_interface(struct ican3_dev *mod)
{ … }
static int ican3_new_send_msg(struct ican3_dev *mod, struct ican3_msg *msg)
{ … }
static int ican3_new_recv_msg(struct ican3_dev *mod, struct ican3_msg *msg)
{ … }
static int ican3_send_msg(struct ican3_dev *mod, struct ican3_msg *msg)
{ … }
static int ican3_recv_msg(struct ican3_dev *mod, struct ican3_msg *msg)
{ … }
static int ican3_msg_connect(struct ican3_dev *mod)
{ … }
static int ican3_msg_disconnect(struct ican3_dev *mod)
{ … }
static int ican3_msg_newhostif(struct ican3_dev *mod)
{ … }
static int ican3_msg_fasthostif(struct ican3_dev *mod)
{ … }
static int ican3_set_id_filter(struct ican3_dev *mod, bool accept)
{ … }
static int ican3_set_bus_state(struct ican3_dev *mod, bool on)
{ … }
static int ican3_set_termination(struct ican3_dev *mod, bool on)
{ … }
static int ican3_send_inquiry(struct ican3_dev *mod, u8 subspec)
{ … }
static int ican3_set_buserror(struct ican3_dev *mod, u8 quota)
{ … }
static void ican3_to_can_frame(struct ican3_dev *mod,
struct ican3_fast_desc *desc,
struct can_frame *cf)
{ … }
static void can_frame_to_ican3(struct ican3_dev *mod,
struct can_frame *cf,
struct ican3_fast_desc *desc)
{ … }
static void ican3_handle_idvers(struct ican3_dev *mod, struct ican3_msg *msg)
{ … }
static void ican3_handle_msglost(struct ican3_dev *mod, struct ican3_msg *msg)
{ … }
static int ican3_handle_cevtind(struct ican3_dev *mod, struct ican3_msg *msg)
{ … }
static void ican3_handle_inquiry(struct ican3_dev *mod, struct ican3_msg *msg)
{ … }
static void ican3_handle_nmtsind(struct ican3_dev *mod, struct ican3_msg *msg)
{ … }
static void ican3_handle_unknown_message(struct ican3_dev *mod,
struct ican3_msg *msg)
{ … }
static void ican3_handle_message(struct ican3_dev *mod, struct ican3_msg *msg)
{ … }
static void ican3_put_echo_skb(struct ican3_dev *mod, struct sk_buff *skb)
{ … }
static unsigned int ican3_get_echo_skb(struct ican3_dev *mod)
{ … }
static bool ican3_echo_skb_matches(struct ican3_dev *mod, struct sk_buff *skb)
{ … }
static bool ican3_txok(struct ican3_dev *mod)
{ … }
static int ican3_recv_skb(struct ican3_dev *mod)
{ … }
static int ican3_napi(struct napi_struct *napi, int budget)
{ … }
static irqreturn_t ican3_irq(int irq, void *dev_id)
{ … }
static int ican3_reset_module(struct ican3_dev *mod)
{ … }
static void ican3_shutdown_module(struct ican3_dev *mod)
{ … }
static int ican3_startup_module(struct ican3_dev *mod)
{ … }
static int ican3_open(struct net_device *ndev)
{ … }
static int ican3_stop(struct net_device *ndev)
{ … }
static netdev_tx_t ican3_xmit(struct sk_buff *skb, struct net_device *ndev)
{ … }
static const struct net_device_ops ican3_netdev_ops = …;
static const struct ethtool_ops ican3_ethtool_ops = …;
static const struct can_bittiming_const ican3_bittiming_const = …;
static int ican3_set_mode(struct net_device *ndev, enum can_mode mode)
{ … }
static int ican3_get_berr_counter(const struct net_device *ndev,
struct can_berr_counter *bec)
{ … }
static ssize_t termination_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t termination_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t fwinfo_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RW(termination);
static DEVICE_ATTR_RO(fwinfo);
static struct attribute *ican3_sysfs_attrs[] = …;
static const struct attribute_group ican3_sysfs_attr_group = …;
static int ican3_probe(struct platform_device *pdev)
{ … }
static void ican3_remove(struct platform_device *pdev)
{ … }
static struct platform_driver ican3_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;