Linux Kernel
3.7.1
|
#include <linux/atomic.h>
#include <linux/netdevice.h>
#include <linux/ktime.h>
#include <linux/mutex.h>
#include <linux/spinlock.h>
#include <linux/can.h>
#include <linux/can/dev.h>
#include "softing_platform.h"
Go to the source code of this file.
Data Structures | |
struct | softing_priv |
struct | softing |
Macros | |
#define | netdev2softing(netdev) ((struct softing_priv *)netdev_priv(netdev)) |
#define | DPRAM_RX 0x0000 |
#define | DPRAM_RX_SIZE 32 |
#define | DPRAM_RX_CNT 16 |
#define | DPRAM_RX_RD 0x0201 /* uint8_t */ |
#define | DPRAM_RX_WR 0x0205 /* uint8_t */ |
#define | DPRAM_RX_LOST 0x0207 /* uint8_t */ |
#define | DPRAM_FCT_PARAM 0x0300 /* int16_t [20] */ |
#define | DPRAM_FCT_RESULT 0x0328 /* int16_t */ |
#define | DPRAM_FCT_HOST 0x032b /* uint16_t */ |
#define | DPRAM_INFO_BUSSTATE 0x0331 /* uint16_t */ |
#define | DPRAM_INFO_BUSSTATE2 0x0335 /* uint16_t */ |
#define | DPRAM_INFO_ERRSTATE 0x0339 /* uint16_t */ |
#define | DPRAM_INFO_ERRSTATE2 0x033d /* uint16_t */ |
#define | DPRAM_RESET 0x0341 /* uint16_t */ |
#define | DPRAM_CLR_RECV_FIFO 0x0345 /* uint16_t */ |
#define | DPRAM_RESET_TIME 0x034d /* uint16_t */ |
#define | DPRAM_TIME 0x0350 /* uint64_t */ |
#define | DPRAM_WR_START 0x0358 /* uint8_t */ |
#define | DPRAM_WR_END 0x0359 /* uint8_t */ |
#define | DPRAM_RESET_RX_FIFO 0x0361 /* uint16_t */ |
#define | DPRAM_RESET_TX_FIFO 0x0364 /* uint8_t */ |
#define | DPRAM_READ_FIFO_LEVEL 0x0365 /* uint8_t */ |
#define | DPRAM_RX_FIFO_LEVEL 0x0366 /* uint16_t */ |
#define | DPRAM_TX_FIFO_LEVEL 0x0366 /* uint16_t */ |
#define | DPRAM_TX 0x0400 /* uint16_t */ |
#define | DPRAM_TX_SIZE 16 |
#define | DPRAM_TX_CNT 32 |
#define | DPRAM_TX_RD 0x0601 /* uint8_t */ |
#define | DPRAM_TX_WR 0x0605 /* uint8_t */ |
#define | DPRAM_COMMAND 0x07e0 /* uint16_t */ |
#define | DPRAM_RECEIPT 0x07f0 /* uint16_t */ |
#define | DPRAM_IRQ_TOHOST 0x07fe /* uint8_t */ |
#define | DPRAM_IRQ_TOCARD 0x07ff /* uint8_t */ |
#define | DPRAM_V2_RESET 0x0e00 /* uint8_t */ |
#define | DPRAM_V2_IRQ_TOHOST 0x0e02 /* uint8_t */ |
#define | TXMAX (DPRAM_TX_CNT - 1) |
#define | RES_NONE 0 |
#define | RES_OK 1 |
#define | RES_NOK 2 |
#define | RES_UNKNOWN 3 |
#define | CMD_TX 0x01 |
#define | CMD_ACK 0x02 |
#define | CMD_XTD 0x04 |
#define | CMD_RTR 0x08 |
#define | CMD_ERR 0x10 |
#define | CMD_BUS2 0x80 |
#define | SF_MASK_BUSOFF 0x80 |
#define | SF_MASK_EPASSIVE 0x60 |
#define | STATE_BUSOFF 2 |
#define | STATE_EPASSIVE 1 |
#define | STATE_EACTIVE 0 |
Functions | |
int | softing_default_output (struct net_device *netdev) |
ktime_t | softing_raw2ktime (struct softing *card, u32 raw) |
int | softing_chip_poweron (struct softing *card) |
int | softing_bootloader_command (struct softing *card, int16_t cmd, const char *msg) |
int | softing_load_fw (const char *file, struct softing *card, __iomem uint8_t *virt, unsigned int size, int offset) |
int | softing_load_app_fw (const char *file, struct softing *card) |
int | softing_enable_irq (struct softing *card, int enable) |
int | softing_startstop (struct net_device *netdev, int up) |
int | softing_netdev_rx (struct net_device *netdev, const struct can_frame *msg, ktime_t ktime) |
#define netdev2softing | ( | netdev | ) | ((struct softing_priv *)netdev_priv(netdev)) |
#define TXMAX (DPRAM_TX_CNT - 1) |
Definition at line 77 of file softing_fw.c.
Definition at line 350 of file softing_fw.c.
int softing_default_output | ( | struct net_device * | netdev | ) |
Definition at line 680 of file softing_fw.c.
Definition at line 432 of file softing_main.c.
Definition at line 230 of file softing_fw.c.
int softing_load_fw | ( | const char * | file, |
struct softing * | card, | ||
__iomem uint8_t * | virt, | ||
unsigned int | size, | ||
int | offset | ||
) |
Definition at line 145 of file softing_fw.c.
Definition at line 144 of file softing_main.c.
Definition at line 397 of file softing_fw.c.
int softing_startstop | ( | struct net_device * | netdev, |
int | up | ||
) |
Definition at line 429 of file softing_fw.c.