StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mvmePciLib.h
1 #ifndef _MVME_PCI_LIB_H_
2 #define _MVME_PCI_LIB_H_
3 
4 #include <vxWorks.h> // for UINT32 etc...
5 
6 #define SPAN_DEV 20
7 
8 
9 #define PMC1_DEV 16
10 #define PMC1_IRQ PMC_INT_LVL1
11 
12 #define PMC2_DEV 17
13 #define PMC2_IRQ PMC_INT_LVL2
14 
15 #define SPAN1_PMC1_DEV 2
16 #define SPAN1_PMC1_IRQ PMC_INT_LVL3
17 
18 #define SPAN1_PMC2_DEV 3
19 #define SPAN1_PMC2_IRQ PMC_INT_LVL4
20 
21 #define SPAN2_PMC1_DEV 4
22 #define SPAN2_PMC1_IRQ PMC_INT_LVL1
23 
24 #define SPAN2_PMC2_DEV 5
25 #define SPAN2_PMC2_IRQ PMC_INT_LVL2
26 
27 #define SPAN_DEV_ID 0x00221011
28 #define SCI_D_DEV_ID 0x065811c8
29 #define MM6140_DEV_ID 0x61401332
30 #define MM6155_DEV_ID 0x61551332
31 #define NCR725_DEV_ID 0x000F1000
32 #define DEC21140_DEV_ID 0x00091011
33 #define MYRI_X_DEV_ID 0x804310E8
34 #define MYRI_64_DEV_ID 0x804314C1
35 #define ACRO_470_DEV_ID 0x545616D5
36 #define RAMIX551_DEV_ID 0x020011B0
37 
38 // this routine sets all the relevant devices on the bus
39 // that haven't been configured by the kernel
40 
41 // number of appropriate devices found during mvmePciSetBus()
42 extern volatile int mvmeSciNum ;
43 extern volatile int mvmeScsiNum ;
44 extern volatile int mvmeEthNum ;
45 extern volatile int mvmeMemNum ;
46 extern volatile int mvmeMyriNum ;
47 extern volatile int mvmeIONum ;
48 
49 struct mvmePMCBoard {
50  UINT32 id ; // dev_id, vendor_id field as an UINT32 (CFG address 0x00)
51  UINT32 base[3] ; // PCI CFG space addresses 0x10, 0x14, 0x18
52  UINT8 vector ; // IRQ vector - directly usable by intConnect() & intEnable()
53  UINT8 bus ; // PCI bus - for use by pciConfigXXX routines
54  UINT8 dev ; // PCI device - for use by pciConfigXXX routines
55 } ;
56 
57 // the appropriate structures
58 extern volatile struct mvmePMCBoard mvmePMCScsi[] ;
59 extern volatile struct mvmePMCBoard mvmePMCEth[] ;
60 extern volatile struct mvmePMCBoard mvmePMCMem[] ;
61 extern volatile struct mvmePMCBoard mvmePMCSci[] ;
62 extern struct mvmePMCBoard mvmePMCMyri[] ;
63 extern volatile struct mvmePMCBoard mvmePMCIO[] ;
64 
65 #endif // _MVME_PCI_LIB_H_