1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
/* $OpenBSD: ravenreg.h,v 1.2 2004/01/27 10:04:18 miod Exp $ */
/*
* Copyright (c) 2001 Steve Murphree, Jr.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed under OpenBSD for RTMX Inc
* by Per Fogelstrom, Opsycon AB.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*
* ravenreg.h: Motorola 'Raven' PowerPC to PCI bridge controller
*/
#ifndef _MACHINE_RAVENREG_H_
#define _MACHINE_RAVENREG_H_
#define RAVEN_REG 0xFEFF0000
#define RAVEN_VENDOR 0xFEFF0000
#define RAVEN_MAGIC 0x10574801 /* vendor information */
#define RAVEN_DEVICE 0xFEFF0002
#define RAVEN_REVID 0xFEFF0005
#define RAVEN_GCSR 0xFEFF0008
#define RAVEN_FEAT 0xFEFF000A
#define RAVEN_MARB 0xFEFF000E
#define RAVEN_PIACK 0xFEFF0030
#define RAVEN_MSADD0 0xFEFF0040
#define RAVEN_MSADD0_PREP 0xC000FCFF
#define RAVEN_MSOFF0 0xFEFF0044
#define RAVEN_MSOFF0_PREP 0x400000C2
#define RAVEN_MSADD1 0xFEFF0048
#define RAVEN_MSADD1_PREP 0x00000000
#define RAVEN_MSOFF1 0xFEFF004C
#define RAVEN_MSOFF1_PREP 0x00000002
#define RAVEN_MSADD2 0xFEFF0050
#define RAVEN_MSADD2_PREP 0x00000000
#define RAVEN_MSOFF2 0xFEFF0054
#define RAVEN_MSOFF2_PREP 0x00000002
#define RAVEN_MSADD3 0xFEFF0058
#define RAVEN_MSADD3_PREP 0x8000BFFF
#define RAVEN_MSOFF3 0xFEFF005C
#define RAVEN_MSOFF3_PREP 0x800000C0
/* Where we map the PCI memory space - MAP A*/
#define RAVEN_V_PCI_MEM_SPACE 0xc0000000 /* Virtual */
#define RAVEN_P_PCI_MEM_SPACE 0xc0000000 /* Physical */
/* Where we map the PCI I/O space - MAP A*/
#define RAVEN_P_ISA_IO_SPACE 0x80000000
#define RAVEN_V_ISA_IO_SPACE 0x80000000
#define RAVEN_V_PCI_IO_SPACE 0x80000000
#define RAVEN_P_PCI_IO_SPACE 0x80000000
#define PREP_CONFIG_ADD 0x80000CF8
#define PREP_CONFIG_DAT 0x80000CFC
/* Where we map the config space */
#define RAVEN_PCI_CONF_SPACE (RAVEN_V_ISA_IO_SPACE + 0x00800000)
/* Where we map the PCI memory space - MAP B*/
#define RAVEN_P_PCI_MEM_SPACE_MAP_B 0x80000000 /* Physical */
/* Where we map the PCI I/O space - MAP B*/
#define RAVEN_P_PCI_IO_SPACE_MAP_B 0xfe000000
/* offsets from base pointer */
#define RAVEN_REGOFFS(x) ((x) | 0x80000000)
/* Where PCI devices sees CPU memory. */
#define RAVEN_PCI_CPUMEM 0x80000000
#define RAVEN_PCI_VENDOR 0x00
#define RAVEN_PCI_DEVICE 0x02
#define RAVEN_PCI_CMD 0x04
#define RAVEN_PCI_STAT 0x06
#define RAVEN_PCI_REVID 0x08
#define RAVEN_PCI_IO 0x10
#define RAVEN_PCI_MEM 0x14
#define RAVEN_PCI_PSADD0 0x80
#define RAVEN_PCI_PSADD0_VAL 0x8000FBFF
#define RAVEN_PCI_PSOFF0 0x84
#define RAVEN_PCI_PSOFF0_VAL 0x800000F0
#define RAVEN_PCI_PSADD1 0x88
#define RAVEN_PCI_PSADD1_VAL 0xC000FCFF
#define RAVEN_PCI_PSOFF1 0x8C
#define RAVEN_PCI_PSOFF1_VAL 0x400000F0
#define RAVEN_PCI_PSADD2 0x90
#define RAVEN_PCI_PSADD2_VAL 0x00000000
#define RAVEN_PCI_PSOFF2 0x94
#define RAVEN_PCI_PSOFF2_VAL 0x00000000
#define RAVEN_PCI_PSADD3 0x98
#define RAVEN_PCI_PSADD3_VAL 0x00000000
#define RAVEN_PCI_PSOFF3 0x9C
#define RAVEN_PCI_PSOFF3_VAL 0x00000000
#define RAVEN_CMD_IOSP 0x0001
#define RAVEN_CMD_MEMSP 0x0002
#define RAVEN_CMD_MASTR 0x0004
#endif /* _MACHINE_RAVENREG_H_ */
|