1 /*****************************************************************************
2 * sdladrv.h SDLA Support Module. Kernel API Definitions.
4 * Author: Gene Kozin <genek@compuserve.com>
6 * Copyright: (c) 1995-1996 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 * Dec 11, 1996 Gene Kozin Complete overhaul.
14 * Oct 17, 1996 Gene Kozin Minor bug fixes.
15 * Jun 12, 1996 Gene Kozin Added support for S503 card.
16 * Dec 06, 1995 Gene Kozin Initial version.
17 *****************************************************************************/
21 #define SDLA_MAXIORANGE 4 /* maximum I/O port range */
22 #define SDLA_WINDOWSIZE 0x2000 /* default dual-port memory window size */
24 /****** Data Structures *****************************************************/
26 /*----------------------------------------------------------------------------
27 * Adapter hardware configuration. Pointer to this structure is passed to all
32 unsigned type
; /* adapter type */
33 unsigned fwid
; /* firmware ID */
34 unsigned port
; /* adapter I/O port base */
35 int irq
; /* interrupt request level */
36 void * dpmbase
; /* dual-port memory base */
37 unsigned dpmsize
; /* dual-port memory size */
38 unsigned pclk
; /* CPU clock rate, kHz */
39 unsigned long memory
; /* memory size */
40 unsigned long vector
; /* local offset of the DPM window */
41 unsigned io_range
; /* I/O port range */
42 unsigned char regs
[SDLA_MAXIORANGE
]; /* was written to registers */
46 /****** Function Prototypes *************************************************/
48 extern int sdla_setup (sdlahw_t
* hw
, void* sfm
, unsigned len
);
49 extern int sdla_down (sdlahw_t
* hw
);
50 extern int sdla_inten (sdlahw_t
* hw
);
51 extern int sdla_intde (sdlahw_t
* hw
);
52 extern int sdla_intack (sdlahw_t
* hw
);
53 extern int sdla_intr (sdlahw_t
* hw
);
54 extern int sdla_mapmem (sdlahw_t
* hw
, unsigned long addr
);
55 extern int sdla_peek (sdlahw_t
* hw
, unsigned long addr
, void* buf
,
57 extern int sdla_poke (sdlahw_t
* hw
, unsigned long addr
, void* buf
,
59 extern int sdla_exec (void* opflag
);
61 #endif /* _SDLADRV_H */