Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
avmcard.h File Reference
#include <linux/spinlock.h>
#include <linux/list.h>
#include <linux/interrupt.h>

Go to the source code of this file.

Data Structures

struct  avmcard_dmabuf
 
struct  avmcard_dmainfo
 
struct  avmctrl_info
 
struct  avmcard
 

Macros

#define AVMB1_PORTLEN   0x1f
 
#define AVM_MAXVERSION   8
 
#define AVM_NCCI_PER_CHANNEL   4
 
#define VER_DRIVER   0
 
#define VER_CARDTYPE   1
 
#define VER_HWID   2
 
#define VER_SERIAL   3
 
#define VER_OPTION   4
 
#define VER_PROTO   5
 
#define VER_PROFILE   6
 
#define VER_CAPI   7
 
#define SEND_POLL
 
#define SEND_INIT
 
#define SEND_REGISTER
 
#define SEND_RELEASE
 
#define SEND_MESSAGE
 
#define SEND_DATA_B3_REQ
 
#define SEND_CONFIG
 
#define SEND_POLLACK   0x73 /* T1 Watchdog */
 
#define RECEIVE_POLL
 
#define RECEIVE_INIT
 
#define RECEIVE_MESSAGE
 
#define RECEIVE_DATA_B3_IND
 
#define RECEIVE_START
 
#define RECEIVE_STOP
 
#define RECEIVE_NEW_NCCI
 
#define RECEIVE_FREE_NCCI
 
#define RECEIVE_RELEASE
 
#define RECEIVE_TASK_READY
 
#define RECEIVE_DEBUGMSG
 
#define RECEIVE_POLLDWORD   0x75 /* t1pci in dword mode */
 
#define WRITE_REGISTER   0x00
 
#define READ_REGISTER   0x01
 
#define B1_READ   0x00
 
#define B1_WRITE   0x01
 
#define B1_INSTAT   0x02
 
#define B1_OUTSTAT   0x03
 
#define B1_ANALYSE   0x04
 
#define B1_REVISION   0x05
 
#define B1_RESET   0x10
 
#define B1_STAT0(cardtype)   ((cardtype) == avm_m1 ? 0x81200000l : 0x80A00000l)
 
#define B1_STAT1(cardtype)   (0x80E00000l)
 
#define T1_FASTLINK   0x00
 
#define T1_SLOWLINK   0x08
 
#define T1_READ   B1_READ
 
#define T1_WRITE   B1_WRITE
 
#define T1_INSTAT   B1_INSTAT
 
#define T1_OUTSTAT   B1_OUTSTAT
 
#define T1_IRQENABLE   0x05
 
#define T1_FIFOSTAT   0x06
 
#define T1_RESETLINK   0x10
 
#define T1_ANALYSE   0x11
 
#define T1_IRQMASTER   0x12
 
#define T1_IDENT   0x17
 
#define T1_RESETBOARD   0x1f
 
#define T1F_IREADY   0x01
 
#define T1F_IHALF   0x02
 
#define T1F_IFULL   0x04
 
#define T1F_IEMPTY   0x08
 
#define T1F_IFLAGS   0xF0
 
#define T1F_OREADY   0x10
 
#define T1F_OHALF   0x20
 
#define T1F_OEMPTY   0x40
 
#define T1F_OFULL   0x80
 
#define T1F_OFLAGS   0xF0
 
#define FIFO_OUTBSIZE   256
 
#define FIFO_INPBSIZE   512
 
#define HEMA_VERSION_ID   0
 
#define HEMA_PAL_ID   0
 

Typedefs

typedef struct avmcard_dmabuf avmcard_dmabuf
 
typedef struct avmcard_dmainfo avmcard_dmainfo
 
typedef struct avmctrl_info avmctrl_info
 
typedef struct avmcard avmcard
 

Enumerations

enum  avmcardtype {
  avm_b1isa, avm_b1pci, avm_b1pcmcia, avm_m1,
  avm_m2, avm_t1isa, avm_t1pci, avm_c4,
  avm_c2
}
 

Functions

avmcardb1_alloc_card (int nr_controllers)
 
void b1_free_card (avmcard *card)
 
int b1_detect (unsigned int base, enum avmcardtype cardtype)
 
void b1_getrevision (avmcard *card)
 
int b1_load_t4file (avmcard *card, capiloaddatapart *t4file)
 
int b1_load_config (avmcard *card, capiloaddatapart *config)
 
int b1_loaded (avmcard *card)
 
int b1_load_firmware (struct capi_ctr *ctrl, capiloaddata *data)
 
void b1_reset_ctr (struct capi_ctr *ctrl)
 
void b1_register_appl (struct capi_ctr *ctrl, u16 appl, capi_register_params *rp)
 
void b1_release_appl (struct capi_ctr *ctrl, u16 appl)
 
u16 b1_send_message (struct capi_ctr *ctrl, struct sk_buff *skb)
 
void b1_parse_version (avmctrl_info *card)
 
irqreturn_t b1_interrupt (int interrupt, void *devptr)
 
avmcard_dmainfoavmcard_dma_alloc (char *name, struct pci_dev *, long rsize, long ssize)
 
void avmcard_dma_free (avmcard_dmainfo *)
 
int b1pciv4_detect (avmcard *card)
 
int t1pci_detect (avmcard *card)
 
void b1dma_reset (avmcard *card)
 
irqreturn_t b1dma_interrupt (int interrupt, void *devptr)
 
int b1dma_load_firmware (struct capi_ctr *ctrl, capiloaddata *data)
 
void b1dma_reset_ctr (struct capi_ctr *ctrl)
 
void b1dma_remove_ctr (struct capi_ctr *ctrl)
 
void b1dma_register_appl (struct capi_ctr *ctrl, u16 appl, capi_register_params *rp)
 
void b1dma_release_appl (struct capi_ctr *ctrl, u16 appl)
 
u16 b1dma_send_message (struct capi_ctr *ctrl, struct sk_buff *skb)
 

Variables

int b1_irq_table [16]
 
struct file_operations b1ctl_proc_fops
 
struct file_operations b1dmactl_proc_fops
 

Macro Definition Documentation

#define AVM_MAXVERSION   8

Definition at line 18 of file avmcard.h.

#define AVM_NCCI_PER_CHANNEL   4

Definition at line 19 of file avmcard.h.

#define AVMB1_PORTLEN   0x1f

Definition at line 17 of file avmcard.h.

#define B1_ANALYSE   0x04

Definition at line 148 of file avmcard.h.

#define B1_INSTAT   0x02

Definition at line 146 of file avmcard.h.

#define B1_OUTSTAT   0x03

Definition at line 147 of file avmcard.h.

#define B1_READ   0x00

Definition at line 144 of file avmcard.h.

#define B1_RESET   0x10

Definition at line 150 of file avmcard.h.

#define B1_REVISION   0x05

Definition at line 149 of file avmcard.h.

#define B1_STAT0 (   cardtype)    ((cardtype) == avm_m1 ? 0x81200000l : 0x80A00000l)

Definition at line 153 of file avmcard.h.

#define B1_STAT1 (   cardtype)    (0x80E00000l)

Definition at line 154 of file avmcard.h.

#define B1_WRITE   0x01

Definition at line 145 of file avmcard.h.

#define FIFO_INPBSIZE   512

Definition at line 320 of file avmcard.h.

#define FIFO_OUTBSIZE   256

Definition at line 319 of file avmcard.h.

#define HEMA_PAL_ID   0

Definition at line 323 of file avmcard.h.

#define HEMA_VERSION_ID   0

Definition at line 322 of file avmcard.h.

#define READ_REGISTER   0x01

Definition at line 138 of file avmcard.h.

#define RECEIVE_DATA_B3_IND
Value:
0x22 /*
* received data int32 AppllID
* int32 Length capi-data ...
* int32 B3Length data ...
*/

Definition at line 127 of file avmcard.h.

#define RECEIVE_DEBUGMSG
Value:
0x71 /*
* int32 Length message
*
*/

Definition at line 134 of file avmcard.h.

#define RECEIVE_FREE_NCCI
Value:
0x26 /*
* int32 AppllID int32 NCCI
*/

Definition at line 131 of file avmcard.h.

#define RECEIVE_INIT
Value:
0x27 /*
* <- after SEND_INIT int32 length
* byte total length b1struct board
* driver revision b1struct card
* type b1struct reserved b1struct
* serial number b1struct driver
* capability b1struct d-channel
* protocol b1struct CAPI-2.0
* profile b1struct capi version
*/

Definition at line 125 of file avmcard.h.

#define RECEIVE_MESSAGE
Value:
0x21 /*
* <- after SEND_MESSAGE int32
* AppllID int32 Length capi-data
* ....
*/

Definition at line 126 of file avmcard.h.

#define RECEIVE_NEW_NCCI
Value:
0x25 /*
* int32 AppllID int32 NCCI int32
* WindowSize
*/

Definition at line 130 of file avmcard.h.

#define RECEIVE_POLL
Value:
0x32 /*
* <- after SEND_POLL
*/

Definition at line 124 of file avmcard.h.

#define RECEIVE_POLLDWORD   0x75 /* t1pci in dword mode */

Definition at line 135 of file avmcard.h.

#define RECEIVE_RELEASE
Value:
0x26 /*
* int32 AppllID int32 0xffffffff
*/

Definition at line 132 of file avmcard.h.

#define RECEIVE_START
Value:
0x23 /*
* Handshake
*/

Definition at line 128 of file avmcard.h.

#define RECEIVE_STOP
Value:
0x24 /*
* Handshake
*/

Definition at line 129 of file avmcard.h.

#define RECEIVE_TASK_READY
Value:
0x31 /*
* int32 tasknr
* int32 Length Taskname ...
*/

Definition at line 133 of file avmcard.h.

#define SEND_CONFIG
Value:
0x21 /*
*/

Definition at line 116 of file avmcard.h.

#define SEND_DATA_B3_REQ
Value:
0x13 /*
* send capi-data-message int32
* MsgLength capi-data ... int32
* B3Length data ....
*/

Definition at line 114 of file avmcard.h.

#define SEND_INIT
Value:
0x11 /*
* first message <- RECEIVE_INIT
* int32 NumApplications int32
* NumNCCIs int32 BoardNumber
*/

Definition at line 110 of file avmcard.h.

#define SEND_MESSAGE
Value:
0x15 /*
* send capi-message int32 length
* capi-data ...
*/

Definition at line 113 of file avmcard.h.

#define SEND_POLL
Value:
0x72 /*
* after load <- RECEIVE_POLL
*/

Definition at line 109 of file avmcard.h.

#define SEND_POLLACK   0x73 /* T1 Watchdog */

Definition at line 118 of file avmcard.h.

#define SEND_REGISTER
Value:
0x12 /*
* register an application int32
* ApplIDId int32 NumMessages
* int32 NumB3Connections int32
* NumB3Blocks int32 B3Size
*
* AnzB3Connection != 0 &&
* AnzB3Blocks >= 1 && B3Size >= 1
*/

Definition at line 111 of file avmcard.h.

#define SEND_RELEASE
Value:
0x14 /*
* deregister an application int32
* ApplID
*/

Definition at line 112 of file avmcard.h.

#define T1_ANALYSE   0x11

Definition at line 301 of file avmcard.h.

#define T1_FASTLINK   0x00

Definition at line 291 of file avmcard.h.

#define T1_FIFOSTAT   0x06

Definition at line 299 of file avmcard.h.

#define T1_IDENT   0x17

Definition at line 303 of file avmcard.h.

#define T1_INSTAT   B1_INSTAT

Definition at line 296 of file avmcard.h.

#define T1_IRQENABLE   0x05

Definition at line 298 of file avmcard.h.

#define T1_IRQMASTER   0x12

Definition at line 302 of file avmcard.h.

#define T1_OUTSTAT   B1_OUTSTAT

Definition at line 297 of file avmcard.h.

#define T1_READ   B1_READ

Definition at line 294 of file avmcard.h.

#define T1_RESETBOARD   0x1f

Definition at line 304 of file avmcard.h.

#define T1_RESETLINK   0x10

Definition at line 300 of file avmcard.h.

#define T1_SLOWLINK   0x08

Definition at line 292 of file avmcard.h.

#define T1_WRITE   B1_WRITE

Definition at line 295 of file avmcard.h.

#define T1F_IEMPTY   0x08

Definition at line 309 of file avmcard.h.

#define T1F_IFLAGS   0xF0

Definition at line 310 of file avmcard.h.

#define T1F_IFULL   0x04

Definition at line 308 of file avmcard.h.

#define T1F_IHALF   0x02

Definition at line 307 of file avmcard.h.

#define T1F_IREADY   0x01

Definition at line 306 of file avmcard.h.

#define T1F_OEMPTY   0x40

Definition at line 314 of file avmcard.h.

#define T1F_OFLAGS   0xF0

Definition at line 316 of file avmcard.h.

#define T1F_OFULL   0x80

Definition at line 315 of file avmcard.h.

#define T1F_OHALF   0x20

Definition at line 313 of file avmcard.h.

#define T1F_OREADY   0x10

Definition at line 312 of file avmcard.h.

#define VER_CAPI   7

Definition at line 32 of file avmcard.h.

#define VER_CARDTYPE   1

Definition at line 26 of file avmcard.h.

#define VER_DRIVER   0

Definition at line 25 of file avmcard.h.

#define VER_HWID   2

Definition at line 27 of file avmcard.h.

#define VER_OPTION   4

Definition at line 29 of file avmcard.h.

#define VER_PROFILE   6

Definition at line 31 of file avmcard.h.

#define VER_PROTO   5

Definition at line 30 of file avmcard.h.

#define VER_SERIAL   3

Definition at line 28 of file avmcard.h.

#define WRITE_REGISTER   0x00

Definition at line 137 of file avmcard.h.

Typedef Documentation

Enumeration Type Documentation

Enumerator:
avm_b1isa 
avm_b1pci 
avm_b1pcmcia 
avm_m1 
avm_m2 
avm_t1isa 
avm_t1pci 
avm_c4 
avm_c2 

Definition at line 34 of file avmcard.h.

Function Documentation

avmcard_dmainfo* avmcard_dma_alloc ( char name,
struct pci_dev ,
long  rsize,
long  ssize 
)
void avmcard_dma_free ( avmcard_dmainfo )
avmcard* b1_alloc_card ( int  nr_controllers)

Definition at line 65 of file b1.c.

int b1_detect ( unsigned int  base,
enum avmcardtype  cardtype 
)

Definition at line 102 of file b1.c.

void b1_free_card ( avmcard card)

Definition at line 94 of file b1.c.

void b1_getrevision ( avmcard card)

Definition at line 145 of file b1.c.

irqreturn_t b1_interrupt ( int  interrupt,
void devptr 
)

Definition at line 490 of file b1.c.

int b1_load_config ( avmcard card,
capiloaddatapart config 
)

Definition at line 194 of file b1.c.

int b1_load_firmware ( struct capi_ctr ctrl,
capiloaddata data 
)

Definition at line 278 of file b1.c.

int b1_load_t4file ( avmcard card,
capiloaddatapart t4file 
)

Definition at line 152 of file b1.c.

int b1_loaded ( avmcard card)

Definition at line 245 of file b1.c.

void b1_parse_version ( avmctrl_info card)

Definition at line 416 of file b1.c.

void b1_register_appl ( struct capi_ctr ctrl,
u16  appl,
capi_register_params rp 
)

Definition at line 339 of file b1.c.

void b1_release_appl ( struct capi_ctr ctrl,
u16  appl 
)

Definition at line 363 of file b1.c.

void b1_reset_ctr ( struct capi_ctr ctrl)

Definition at line 322 of file b1.c.

u16 b1_send_message ( struct capi_ctr ctrl,
struct sk_buff skb 
)

Definition at line 377 of file b1.c.

irqreturn_t b1dma_interrupt ( int  interrupt,
void devptr 
)

Definition at line 639 of file b1dma.c.

int b1dma_load_firmware ( struct capi_ctr ctrl,
capiloaddata data 
)

Definition at line 704 of file b1dma.c.

void b1dma_register_appl ( struct capi_ctr ctrl,
u16  appl,
capi_register_params rp 
)

Definition at line 770 of file b1dma.c.

void b1dma_release_appl ( struct capi_ctr ctrl,
u16  appl 
)

Definition at line 807 of file b1dma.c.

void b1dma_remove_ctr ( struct capi_ctr ctrl)
void b1dma_reset ( avmcard card)

Definition at line 218 of file b1dma.c.

void b1dma_reset_ctr ( struct capi_ctr ctrl)

Definition at line 753 of file b1dma.c.

u16 b1dma_send_message ( struct capi_ctr ctrl,
struct sk_buff skb 
)

Definition at line 838 of file b1dma.c.

int b1pciv4_detect ( avmcard card)

Definition at line 327 of file b1dma.c.

int t1pci_detect ( avmcard card)

Definition at line 291 of file b1dma.c.

Variable Documentation

int b1_irq_table[16]

Definition at line 44 of file b1.c.

struct file_operations b1ctl_proc_fops

Definition at line 708 of file b1.c.

struct file_operations b1dmactl_proc_fops

Definition at line 950 of file b1dma.c.