Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sja1000.h File Reference
#include <linux/irqreturn.h>
#include <linux/can/dev.h>
#include <linux/can/platform/sja1000.h>

Go to the source code of this file.

Data Structures

struct  sja1000_priv
 

Macros

#define SJA1000_ECHO_SKB_MAX   1 /* the SJA1000 has one TX buffer object */
 
#define SJA1000_MAX_IRQ   20 /* max. number of interrupts handled in ISR */
 
#define REG_MOD   0x00
 
#define REG_CMR   0x01
 
#define REG_SR   0x02
 
#define REG_IR   0x03
 
#define REG_IER   0x04
 
#define REG_ALC   0x0B
 
#define REG_ECC   0x0C
 
#define REG_EWL   0x0D
 
#define REG_RXERR   0x0E
 
#define REG_TXERR   0x0F
 
#define REG_ACCC0   0x10
 
#define REG_ACCC1   0x11
 
#define REG_ACCC2   0x12
 
#define REG_ACCC3   0x13
 
#define REG_ACCM0   0x14
 
#define REG_ACCM1   0x15
 
#define REG_ACCM2   0x16
 
#define REG_ACCM3   0x17
 
#define REG_RMC   0x1D
 
#define REG_RBSA   0x1E
 
#define REG_BTR0   0x06
 
#define REG_BTR1   0x07
 
#define REG_OCR   0x08
 
#define REG_CDR   0x1F
 
#define REG_FI   0x10
 
#define SFF_BUF   0x13
 
#define EFF_BUF   0x15
 
#define FI_FF   0x80
 
#define FI_RTR   0x40
 
#define REG_ID1   0x11
 
#define REG_ID2   0x12
 
#define REG_ID3   0x13
 
#define REG_ID4   0x14
 
#define CAN_RAM   0x20
 
#define MOD_RM   0x01
 
#define MOD_LOM   0x02
 
#define MOD_STM   0x04
 
#define MOD_AFM   0x08
 
#define MOD_SM   0x10
 
#define CMD_SRR   0x10
 
#define CMD_CDO   0x08
 
#define CMD_RRB   0x04
 
#define CMD_AT   0x02
 
#define CMD_TR   0x01
 
#define IRQ_BEI   0x80
 
#define IRQ_ALI   0x40
 
#define IRQ_EPI   0x20
 
#define IRQ_WUI   0x10
 
#define IRQ_DOI   0x08
 
#define IRQ_EI   0x04
 
#define IRQ_TI   0x02
 
#define IRQ_RI   0x01
 
#define IRQ_ALL   0xFF
 
#define IRQ_OFF   0x00
 
#define SR_BS   0x80
 
#define SR_ES   0x40
 
#define SR_TS   0x20
 
#define SR_RS   0x10
 
#define SR_TCS   0x08
 
#define SR_TBS   0x04
 
#define SR_DOS   0x02
 
#define SR_RBS   0x01
 
#define SR_CRIT   (SR_BS|SR_ES)
 
#define ECC_SEG   0x1F
 
#define ECC_DIR   0x20
 
#define ECC_ERR   6
 
#define ECC_BIT   0x00
 
#define ECC_FORM   0x40
 
#define ECC_STUFF   0x80
 
#define ECC_MASK   0xc0
 
#define SJA1000_CUSTOM_IRQ_HANDLER   0x1
 

Functions

struct net_devicealloc_sja1000dev (int sizeof_priv)
 
void free_sja1000dev (struct net_device *dev)
 
int register_sja1000dev (struct net_device *dev)
 
void unregister_sja1000dev (struct net_device *dev)
 
irqreturn_t sja1000_interrupt (int irq, void *dev_id)
 

Macro Definition Documentation

#define CAN_RAM   0x20

Definition at line 96 of file sja1000.h.

#define CMD_AT   0x02

Definition at line 109 of file sja1000.h.

#define CMD_CDO   0x08

Definition at line 107 of file sja1000.h.

#define CMD_RRB   0x04

Definition at line 108 of file sja1000.h.

#define CMD_SRR   0x10

Definition at line 106 of file sja1000.h.

#define CMD_TR   0x01

Definition at line 110 of file sja1000.h.

#define ECC_BIT   0x00

Definition at line 140 of file sja1000.h.

#define ECC_DIR   0x20

Definition at line 138 of file sja1000.h.

#define ECC_ERR   6

Definition at line 139 of file sja1000.h.

#define ECC_FORM   0x40

Definition at line 141 of file sja1000.h.

#define ECC_MASK   0xc0

Definition at line 143 of file sja1000.h.

#define ECC_SEG   0x1F

Definition at line 137 of file sja1000.h.

#define ECC_STUFF   0x80

Definition at line 142 of file sja1000.h.

#define EFF_BUF   0x15

Definition at line 86 of file sja1000.h.

#define FI_FF   0x80

Definition at line 88 of file sja1000.h.

#define FI_RTR   0x40

Definition at line 89 of file sja1000.h.

#define IRQ_ALI   0x40

Definition at line 114 of file sja1000.h.

#define IRQ_ALL   0xFF

Definition at line 121 of file sja1000.h.

#define IRQ_BEI   0x80

Definition at line 113 of file sja1000.h.

#define IRQ_DOI   0x08

Definition at line 117 of file sja1000.h.

#define IRQ_EI   0x04

Definition at line 118 of file sja1000.h.

#define IRQ_EPI   0x20

Definition at line 115 of file sja1000.h.

#define IRQ_OFF   0x00

Definition at line 122 of file sja1000.h.

#define IRQ_RI   0x01

Definition at line 120 of file sja1000.h.

#define IRQ_TI   0x02

Definition at line 119 of file sja1000.h.

#define IRQ_WUI   0x10

Definition at line 116 of file sja1000.h.

#define MOD_AFM   0x08

Definition at line 102 of file sja1000.h.

#define MOD_LOM   0x02

Definition at line 100 of file sja1000.h.

#define MOD_RM   0x01

Definition at line 99 of file sja1000.h.

#define MOD_SM   0x10

Definition at line 103 of file sja1000.h.

#define MOD_STM   0x04

Definition at line 101 of file sja1000.h.

#define REG_ACCC0   0x10

Definition at line 67 of file sja1000.h.

#define REG_ACCC1   0x11

Definition at line 68 of file sja1000.h.

#define REG_ACCC2   0x12

Definition at line 69 of file sja1000.h.

#define REG_ACCC3   0x13

Definition at line 70 of file sja1000.h.

#define REG_ACCM0   0x14

Definition at line 71 of file sja1000.h.

#define REG_ACCM1   0x15

Definition at line 72 of file sja1000.h.

#define REG_ACCM2   0x16

Definition at line 73 of file sja1000.h.

#define REG_ACCM3   0x17

Definition at line 74 of file sja1000.h.

#define REG_ALC   0x0B

Definition at line 62 of file sja1000.h.

#define REG_BTR0   0x06

Definition at line 79 of file sja1000.h.

#define REG_BTR1   0x07

Definition at line 80 of file sja1000.h.

#define REG_CDR   0x1F

Definition at line 82 of file sja1000.h.

#define REG_CMR   0x01

Definition at line 58 of file sja1000.h.

#define REG_ECC   0x0C

Definition at line 63 of file sja1000.h.

#define REG_EWL   0x0D

Definition at line 64 of file sja1000.h.

#define REG_FI   0x10

Definition at line 84 of file sja1000.h.

#define REG_ID1   0x11

Definition at line 91 of file sja1000.h.

#define REG_ID2   0x12

Definition at line 92 of file sja1000.h.

#define REG_ID3   0x13

Definition at line 93 of file sja1000.h.

#define REG_ID4   0x14

Definition at line 94 of file sja1000.h.

#define REG_IER   0x04

Definition at line 61 of file sja1000.h.

#define REG_IR   0x03

Definition at line 60 of file sja1000.h.

#define REG_MOD   0x00

Definition at line 57 of file sja1000.h.

#define REG_OCR   0x08

Definition at line 81 of file sja1000.h.

#define REG_RBSA   0x1E

Definition at line 76 of file sja1000.h.

#define REG_RMC   0x1D

Definition at line 75 of file sja1000.h.

#define REG_RXERR   0x0E

Definition at line 65 of file sja1000.h.

#define REG_SR   0x02

Definition at line 59 of file sja1000.h.

#define REG_TXERR   0x0F

Definition at line 66 of file sja1000.h.

#define SFF_BUF   0x13

Definition at line 85 of file sja1000.h.

#define SJA1000_CUSTOM_IRQ_HANDLER   0x1

Definition at line 148 of file sja1000.h.

#define SJA1000_ECHO_SKB_MAX   1 /* the SJA1000 has one TX buffer object */

Definition at line 52 of file sja1000.h.

#define SJA1000_MAX_IRQ   20 /* max. number of interrupts handled in ISR */

Definition at line 54 of file sja1000.h.

#define SR_BS   0x80

Definition at line 125 of file sja1000.h.

#define SR_CRIT   (SR_BS|SR_ES)

Definition at line 134 of file sja1000.h.

#define SR_DOS   0x02

Definition at line 131 of file sja1000.h.

#define SR_ES   0x40

Definition at line 126 of file sja1000.h.

#define SR_RBS   0x01

Definition at line 132 of file sja1000.h.

#define SR_RS   0x10

Definition at line 128 of file sja1000.h.

#define SR_TBS   0x04

Definition at line 130 of file sja1000.h.

#define SR_TCS   0x08

Definition at line 129 of file sja1000.h.

#define SR_TS   0x20

Definition at line 127 of file sja1000.h.

Function Documentation

struct net_device* alloc_sja1000dev ( int  sizeof_priv)
read

Definition at line 606 of file sja1000.c.

void free_sja1000dev ( struct net_device dev)

Definition at line 636 of file sja1000.c.

int register_sja1000dev ( struct net_device dev)

Definition at line 648 of file sja1000.c.

irqreturn_t sja1000_interrupt ( int  irq,
void dev_id 
)

Definition at line 490 of file sja1000.c.

void unregister_sja1000dev ( struct net_device dev)

Definition at line 663 of file sja1000.c.