Merge tag 'v3.3.7' into 3.3/master
[zen-stable.git] / drivers / isdn / hardware / eicon / xdi_adapter.h
bloba3bd163afb8f96b6fe72cac8452a68a3bddf1c6e
1 /* $Id: xdi_adapter.h,v 1.7 2004/03/21 17:26:01 armin Exp $ */
3 #ifndef __DIVA_OS_XDI_ADAPTER_H__
4 #define __DIVA_OS_XDI_ADAPTER_H__
6 #define DIVAS_XDI_ADAPTER_BUS_PCI 0
7 #define DIVAS_XDI_ADAPTER_BUS_ISA 1
9 typedef struct _divas_pci_card_resources {
10 byte bus;
11 byte func;
12 void *hdev;
14 dword bar[8]; /* contains context of appropriate BAR Register */
15 void __iomem *addr[8]; /* same bar, but mapped into memory */
16 dword length[8]; /* bar length */
17 int mem_type_id[MAX_MEM_TYPE];
18 unsigned int qoffset;
19 byte irq;
20 } divas_pci_card_resources_t;
22 typedef union _divas_card_resources {
23 divas_pci_card_resources_t pci;
24 } divas_card_resources_t;
26 struct _diva_os_xdi_adapter;
27 typedef int (*diva_init_card_proc_t) (struct _diva_os_xdi_adapter * a);
28 typedef int (*diva_cmd_card_proc_t) (struct _diva_os_xdi_adapter * a,
29 diva_xdi_um_cfg_cmd_t * data,
30 int length);
31 typedef void (*diva_xdi_clear_interrupts_proc_t) (struct
32 _diva_os_xdi_adapter *);
34 #define DIVA_XDI_MBOX_BUSY 1
35 #define DIVA_XDI_MBOX_WAIT_XLOG 2
37 typedef struct _xdi_mbox_t {
38 dword status;
39 diva_xdi_um_cfg_cmd_data_t cmd_data;
40 dword data_length;
41 void *data;
42 } xdi_mbox_t;
44 typedef struct _diva_os_idi_adapter_interface {
45 diva_init_card_proc_t cleanup_adapter_proc;
46 diva_cmd_card_proc_t cmd_proc;
47 } diva_os_idi_adapter_interface_t;
49 typedef struct _diva_os_xdi_adapter {
50 struct list_head link;
51 int CardIndex;
52 int CardOrdinal;
53 int controller; /* number of this controller */
54 int Bus; /* PCI, ISA, ... */
55 divas_card_resources_t resources;
56 char port_name[24];
57 ISDN_ADAPTER xdi_adapter;
58 xdi_mbox_t xdi_mbox;
59 diva_os_idi_adapter_interface_t interface;
60 struct _diva_os_xdi_adapter *slave_adapters[3];
61 void *slave_list;
62 void *proc_adapter_dir; /* adapterX proc entry */
63 void *proc_info; /* info proc entry */
64 void *proc_grp_opt; /* group_optimization */
65 void *proc_d_l1_down; /* dynamic_l1_down */
66 volatile diva_xdi_clear_interrupts_proc_t clear_interrupts_proc;
67 dword dsp_mask;
68 } diva_os_xdi_adapter_t;
70 #endif