1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* $Id: xdi_adapter.h,v 1.7 2004/03/21 17:26:01 armin Exp $ */
4 #ifndef __DIVA_OS_XDI_ADAPTER_H__
5 #define __DIVA_OS_XDI_ADAPTER_H__
7 #define DIVAS_XDI_ADAPTER_BUS_PCI 0
8 #define DIVAS_XDI_ADAPTER_BUS_ISA 1
10 typedef struct _divas_pci_card_resources
{
15 dword bar
[8]; /* contains context of appropriate BAR Register */
16 void __iomem
*addr
[8]; /* same bar, but mapped into memory */
17 dword length
[8]; /* bar length */
18 int mem_type_id
[MAX_MEM_TYPE
];
21 } divas_pci_card_resources_t
;
23 typedef union _divas_card_resources
{
24 divas_pci_card_resources_t pci
;
25 } divas_card_resources_t
;
27 struct _diva_os_xdi_adapter
;
28 typedef int (*diva_init_card_proc_t
)(struct _diva_os_xdi_adapter
*a
);
29 typedef int (*diva_cmd_card_proc_t
)(struct _diva_os_xdi_adapter
*a
,
30 diva_xdi_um_cfg_cmd_t
*data
,
32 typedef void (*diva_xdi_clear_interrupts_proc_t
)(struct
33 _diva_os_xdi_adapter
*);
35 #define DIVA_XDI_MBOX_BUSY 1
36 #define DIVA_XDI_MBOX_WAIT_XLOG 2
38 typedef struct _xdi_mbox_t
{
40 diva_xdi_um_cfg_cmd_data_t cmd_data
;
45 typedef struct _diva_os_idi_adapter_interface
{
46 diva_init_card_proc_t cleanup_adapter_proc
;
47 diva_cmd_card_proc_t cmd_proc
;
48 } diva_os_idi_adapter_interface_t
;
50 typedef struct _diva_os_xdi_adapter
{
51 struct list_head link
;
54 int controller
; /* number of this controller */
55 int Bus
; /* PCI, ISA, ... */
56 divas_card_resources_t resources
;
58 ISDN_ADAPTER xdi_adapter
;
60 diva_os_idi_adapter_interface_t interface
;
61 struct _diva_os_xdi_adapter
*slave_adapters
[3];
63 void *proc_adapter_dir
; /* adapterX proc entry */
64 void *proc_info
; /* info proc entry */
65 void *proc_grp_opt
; /* group_optimization */
66 void *proc_d_l1_down
; /* dynamic_l1_down */
67 volatile diva_xdi_clear_interrupts_proc_t clear_interrupts_proc
;
69 } diva_os_xdi_adapter_t
;