1 /*****************************************************************************
2 * sdladrv.h SDLA Support Module. Kernel API Definitions.
6 * Copyright: (c) 1995-2000 Sangoma Technologies Inc.
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 * ============================================================================
13 * Jun 02, 1999 Gideon Hack Added support for the S514 PCI adapter.
14 * Dec 11, 1996 Gene Kozin Complete overhaul.
15 * Oct 17, 1996 Gene Kozin Minor bug fixes.
16 * Jun 12, 1996 Gene Kozin Added support for S503 card.
17 * Dec 06, 1995 Gene Kozin Initial version.
18 *****************************************************************************/
23 #define SDLA_MAXIORANGE 4 /* maximum I/O port range */
24 #define SDLA_WINDOWSIZE 0x2000 /* default dual-port memory window size */
25 /****** Data Structures *****************************************************/
27 /*----------------------------------------------------------------------------
28 * Adapter hardware configuration. Pointer to this structure is passed to all
33 unsigned type
; /* adapter type */
34 unsigned fwid
; /* firmware ID */
35 unsigned port
; /* adapter I/O port base */
36 int irq
; /* interrupt request level */
37 char S514_cpu_no
[1]; /* PCI CPU Number */
38 unsigned char S514_slot_no
; /* PCI Slot Number */
39 char auto_pci_cfg
; /* Autodetect PCI Slot */
40 struct pci_dev
*pci_dev
; /* PCI device */
41 void * dpmbase
; /* dual-port memory base */
42 unsigned dpmsize
; /* dual-port memory size */
43 unsigned pclk
; /* CPU clock rate, kHz */
44 unsigned long memory
; /* memory size */
45 unsigned long vector
; /* local offset of the DPM window */
46 unsigned io_range
; /* I/O port range */
47 unsigned char regs
[SDLA_MAXIORANGE
]; /* was written to registers */
51 /****** Function Prototypes *************************************************/
53 extern int sdla_setup (sdlahw_t
* hw
, void* sfm
, unsigned len
);
54 extern int sdla_down (sdlahw_t
* hw
);
55 extern void S514_intack (sdlahw_t
* hw
, u32 int_status
);
56 extern void read_S514_int_stat (sdlahw_t
* hw
, u32
* int_status
);
57 extern int sdla_mapmem (sdlahw_t
* hw
, unsigned long addr
);
58 extern int sdla_peek (sdlahw_t
* hw
, unsigned long addr
, void* buf
,
60 extern int sdla_poke (sdlahw_t
* hw
, unsigned long addr
, void* buf
,
62 extern int sdla_exec (void* opflag
);
64 extern unsigned wanpipe_hw_probe(void);
66 #endif /* _SDLADRV_H */