Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
at 33bc227e4e48ddadcf2eacb381c19df338f0a6c8 66 lines 2.7 kB view raw
1/***************************************************************************** 2* sdladrv.h SDLA Support Module. Kernel API Definitions. 3* 4* Author: Gideon Hack 5* 6* Copyright: (c) 1995-2000 Sangoma Technologies Inc. 7* 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*****************************************************************************/ 19#ifndef _SDLADRV_H 20#define _SDLADRV_H 21 22 23#define SDLA_MAXIORANGE 4 /* maximum I/O port range */ 24#define SDLA_WINDOWSIZE 0x2000 /* default dual-port memory window size */ 25/****** Data Structures *****************************************************/ 26 27/*---------------------------------------------------------------------------- 28 * Adapter hardware configuration. Pointer to this structure is passed to all 29 * APIs. 30 */ 31typedef struct sdlahw 32{ 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 */ 48 unsigned reserved[5]; 49} sdlahw_t; 50 51/****** Function Prototypes *************************************************/ 52 53extern int sdla_setup (sdlahw_t* hw, void* sfm, unsigned len); 54extern int sdla_down (sdlahw_t* hw); 55extern void S514_intack (sdlahw_t* hw, u32 int_status); 56extern void read_S514_int_stat (sdlahw_t* hw, u32* int_status); 57extern int sdla_mapmem (sdlahw_t* hw, unsigned long addr); 58extern int sdla_peek (sdlahw_t* hw, unsigned long addr, void* buf, 59 unsigned len); 60extern int sdla_poke (sdlahw_t* hw, unsigned long addr, void* buf, 61 unsigned len); 62extern int sdla_exec (void* opflag); 63 64extern unsigned wanpipe_hw_probe(void); 65 66#endif /* _SDLADRV_H */