Merge tag 'riscv-for-linus-4.15-rc2_cleanups' of git://git.kernel.org/pub/scm/linux...
[linux/fpc-iii.git] / drivers / isdn / hardware / eicon / xdi_adapter.h
blobb036e217c65953d77c686ffa5d120b7f7207008f
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 {
11 byte bus;
12 byte func;
13 void *hdev;
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];
19 unsigned int qoffset;
20 byte irq;
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,
31 int length);
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 {
39 dword status;
40 diva_xdi_um_cfg_cmd_data_t cmd_data;
41 dword data_length;
42 void *data;
43 } xdi_mbox_t;
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;
52 int CardIndex;
53 int CardOrdinal;
54 int controller; /* number of this controller */
55 int Bus; /* PCI, ISA, ... */
56 divas_card_resources_t resources;
57 char port_name[24];
58 ISDN_ADAPTER xdi_adapter;
59 xdi_mbox_t xdi_mbox;
60 diva_os_idi_adapter_interface_t interface;
61 struct _diva_os_xdi_adapter *slave_adapters[3];
62 void *slave_list;
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;
68 dword dsp_mask;
69 } diva_os_xdi_adapter_t;
71 #endif