Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
86 f9daq 1
#ifndef __ARWPCI_H__
2
#define __ARWPCI_H__
3
 
4
//****************************************************************************
5
// Copyright (C) 2000-2005  ARW Elektronik Germany
6
//
7
//
8
// This program is free software; you can redistribute it and/or modify
9
// it under the terms of the GNU General Public License as published by
10
// the Free Software Foundation; either version 2 of the License, or
11
// (at your option) any later version.
12
//
13
// This program is distributed in the hope that it will be useful,
14
// but WITHOUT ANY WARRANTY; without even the implied warranty of
15
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
// GNU General Public License for more details.
17
//
18
// You should have received a copy of the GNU General Public License
19
// along with this program; if not, write to the Free Software
20
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
//
22
// This product is not authorized for use as critical component in 
23
// life support systems without the express written approval of 
24
// ARW Elektronik Germany.
25
//  
26
// Please announce changes and hints to ARW Elektronik
27
//
28
// Maintainer(s): Klaus Hitschler (klaus.hitschler@gmx.de)
29
//
30
//****************************************************************************
31
 
32
//****************************************************************************
33
//
34
// askpci.h - definitions for basic access functions of pci information
35
//
36
// $Log: askpci.h,v $
37
// Revision 1.5  2005/10/07 16:57:10  klaus
38
// fixed a bug with request_irq with IRQs greater than 127
39
//
40
// Revision 1.4  2004/08/12 19:59:19  klaus
41
// conversion to kernel-version 2.6, released version 6.0
42
//
43
// Revision 1.3  2003/05/11 11:12:03  klaus
44
// matched to kernel 2.4 PCI handling, debug messages improved
45
//
46
// Revision 1.2  2001/11/20 20:12:50  klaus
47
// included new header and CVS log
48
//
49
//
50
// derived from code originated from Dirk Muehlenberg         AR   18.02.2000
51
//
52
//****************************************************************************
53
 
54
/*--- INCLUDES -------------------------------------------------------------------------*/
55
#include <linux/version.h>
56
#include <linux/pci.h>
57
#include <asm/types.h>
58
 
59
/*--- TYPEDEFS -------------------------------------------------------------------------*/
60
typedef struct
61
{
62
  __u32 base_address;                                   // base address of this window 
63
  __u32 size;                                                                   // size of this window
64
  __u16 type;                                                                   // io or memory
65
  __u16 prefetchable;                                   // is it prefetchable 
66
} IO_DESC;
67
 
68
typedef struct _PCIConfigHeader
69
{
70
  short index;                                                          // consecutive index of PCI devices
71
 
72
  __u16 device_id;                                              // PCI device id
73
  __u16 vendor_id;                                              // PCI vendor id
74
  __u16 subsystem_id;                                   // PCI subsystem device id
75
  __u16 subsystem_vendor_id;    // PCI subvendor id
76
 
77
  IO_DESC desc[6];                                              // address descriptors
78
 
79
        struct pci_dev *PCI_dev;                // pointer to linux managed PCI device
80
} PCIConfigHeader;
81
 
82
/*--- PROTOTYPES -------------------------------------------------------------------------*/
83
PCIConfigHeader *GetPCIConfigHeader(__u16 vendor_id, __u16 device_id, short index);
84
 
85
#endif  /* __ARWPCI_H__ */
86