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 {
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];
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,
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 {
39 diva_xdi_um_cfg_cmd_data_t cmd_data;
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;
53 int controller; /* number of this controller */
54 int Bus; /* PCI, ISA, ... */
55 divas_card_resources_t resources;
57 ISDN_ADAPTER xdi_adapter;
59 diva_os_idi_adapter_interface_t interface;
60 struct _diva_os_xdi_adapter *slave_adapters[3];
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;
68 } diva_os_xdi_adapter_t;