blob: 48255a34f94769b530b6707819780be344fe6ef3 [file] [log] [blame]
Eran Libertyf046ccd2005-07-28 10:08:46 -05001#ifndef _PPC_KERNEL_MPC8349_PCI_H
2#define _PPC_KERNEL_MPC8349_PCI_H
3
4
5#define M8265_PCIBR0 0x101ac
6#define M8265_PCIBR1 0x101b0
7#define M8265_PCIMSK0 0x101c4
8#define M8265_PCIMSK1 0x101c8
9
10/* Bit definitions for PCIBR registers */
11
12#define PCIBR_ENABLE 0x00000001
13
14/* Bit definitions for PCIMSK registers */
15
16#define PCIMSK_32KB 0xFFFF8000 /* Size of window, smallest */
17#define PCIMSK_64KB 0xFFFF0000
18#define PCIMSK_128KB 0xFFFE0000
19#define PCIMSK_256KB 0xFFFC0000
20#define PCIMSK_512KB 0xFFF80000
21#define PCIMSK_1MB 0xFFF00000
22#define PCIMSK_2MB 0xFFE00000
23#define PCIMSK_4MB 0xFFC00000
24#define PCIMSK_8MB 0xFF800000
25#define PCIMSK_16MB 0xFF000000
26#define PCIMSK_32MB 0xFE000000
27#define PCIMSK_64MB 0xFC000000
28#define PCIMSK_128MB 0xF8000000
29#define PCIMSK_256MB 0xF0000000
30#define PCIMSK_512MB 0xE0000000
31#define PCIMSK_1GB 0xC0000000 /* Size of window, largest */
32
33
34#define M826X_SCCR_PCI_MODE_EN 0x100
35
36
37/*
38 * Outbound ATU registers (3 sets). These registers control how 60x bus
39 * (local) addresses are translated to PCI addresses when the MPC826x is
40 * a PCI bus master (initiator).
41 */
42
43#define POTAR_REG0 0x10800 /* PCI Outbound Translation Addr registers */
44#define POTAR_REG1 0x10818
45#define POTAR_REG2 0x10830
46
47#define POBAR_REG0 0x10808 /* PCI Outbound Base Addr registers */
48#define POBAR_REG1 0x10820
49#define POBAR_REG2 0x10838
50
51#define POCMR_REG0 0x10810 /* PCI Outbound Comparison Mask registers */
52#define POCMR_REG1 0x10828
53#define POCMR_REG2 0x10840
54
55/* Bit definitions for POMCR registers */
56
57#define POCMR_MASK_4KB 0x000FFFFF
58#define POCMR_MASK_8KB 0x000FFFFE
59#define POCMR_MASK_16KB 0x000FFFFC
60#define POCMR_MASK_32KB 0x000FFFF8
61#define POCMR_MASK_64KB 0x000FFFF0
62#define POCMR_MASK_128KB 0x000FFFE0
63#define POCMR_MASK_256KB 0x000FFFC0
64#define POCMR_MASK_512KB 0x000FFF80
65#define POCMR_MASK_1MB 0x000FFF00
66#define POCMR_MASK_2MB 0x000FFE00
67#define POCMR_MASK_4MB 0x000FFC00
68#define POCMR_MASK_8MB 0x000FF800
69#define POCMR_MASK_16MB 0x000FF000
70#define POCMR_MASK_32MB 0x000FE000
71#define POCMR_MASK_64MB 0x000FC000
72#define POCMR_MASK_128MB 0x000F8000
73#define POCMR_MASK_256MB 0x000F0000
74#define POCMR_MASK_512MB 0x000E0000
75#define POCMR_MASK_1GB 0x000C0000
76
77#define POCMR_ENABLE 0x80000000
78#define POCMR_PCI_IO 0x40000000
79#define POCMR_PREFETCH_EN 0x20000000
80
81/* Soft PCI reset */
82
83#define PCI_GCR_REG 0x10880
84
85/* Bit definitions for PCI_GCR registers */
86
87#define PCIGCR_PCI_BUS_EN 0x1
88
89/*
90 * Inbound ATU registers (2 sets). These registers control how PCI
91 * addresses are translated to 60x bus (local) addresses when the
92 * MPC826x is a PCI bus target.
93 */
94
95#define PITAR_REG1 0x108D0
96#define PIBAR_REG1 0x108D8
97#define PICMR_REG1 0x108E0
98#define PITAR_REG0 0x108E8
99#define PIBAR_REG0 0x108F0
100#define PICMR_REG0 0x108F8
101
102/* Bit definitions for PCI Inbound Comparison Mask registers */
103
104#define PICMR_MASK_4KB 0x000FFFFF
105#define PICMR_MASK_8KB 0x000FFFFE
106#define PICMR_MASK_16KB 0x000FFFFC
107#define PICMR_MASK_32KB 0x000FFFF8
108#define PICMR_MASK_64KB 0x000FFFF0
109#define PICMR_MASK_128KB 0x000FFFE0
110#define PICMR_MASK_256KB 0x000FFFC0
111#define PICMR_MASK_512KB 0x000FFF80
112#define PICMR_MASK_1MB 0x000FFF00
113#define PICMR_MASK_2MB 0x000FFE00
114#define PICMR_MASK_4MB 0x000FFC00
115#define PICMR_MASK_8MB 0x000FF800
116#define PICMR_MASK_16MB 0x000FF000
117#define PICMR_MASK_32MB 0x000FE000
118#define PICMR_MASK_64MB 0x000FC000
119#define PICMR_MASK_128MB 0x000F8000
120#define PICMR_MASK_256MB 0x000F0000
121#define PICMR_MASK_512MB 0x000E0000
122#define PICMR_MASK_1GB 0x000C0000
123
124#define PICMR_ENABLE 0x80000000
125#define PICMR_NO_SNOOP_EN 0x40000000
126#define PICMR_PREFETCH_EN 0x20000000
127
128/* PCI error Registers */
129
130#define PCI_ERROR_STATUS_REG 0x10884
131#define PCI_ERROR_MASK_REG 0x10888
132#define PCI_ERROR_CONTROL_REG 0x1088C
133#define PCI_ERROR_ADRS_CAPTURE_REG 0x10890
134#define PCI_ERROR_DATA_CAPTURE_REG 0x10898
135#define PCI_ERROR_CTRL_CAPTURE_REG 0x108A0
136
137/* PCI error Register bit defines */
138
139#define PCI_ERROR_PCI_ADDR_PAR 0x00000001
140#define PCI_ERROR_PCI_DATA_PAR_WR 0x00000002
141#define PCI_ERROR_PCI_DATA_PAR_RD 0x00000004
142#define PCI_ERROR_PCI_NO_RSP 0x00000008
143#define PCI_ERROR_PCI_TAR_ABT 0x00000010
144#define PCI_ERROR_PCI_SERR 0x00000020
145#define PCI_ERROR_PCI_PERR_RD 0x00000040
146#define PCI_ERROR_PCI_PERR_WR 0x00000080
147#define PCI_ERROR_I2O_OFQO 0x00000100
148#define PCI_ERROR_I2O_IPQO 0x00000200
149#define PCI_ERROR_IRA 0x00000400
150#define PCI_ERROR_NMI 0x00000800
151#define PCI_ERROR_I2O_DBMC 0x00001000
152
153/*
154 * Register pair used to generate configuration cycles on the PCI bus
155 * and access the MPC826x's own PCI configuration registers.
156 */
157
158#define PCI_CFG_ADDR_REG 0x10900
159#define PCI_CFG_DATA_REG 0x10904
160
161/* Bus parking decides where the bus control sits when idle */
162/* If modifying memory controllers for PCI park on the core */
163
164#define PPC_ACR_BUS_PARK_CORE 0x6
165#define PPC_ACR_BUS_PARK_PCI 0x3
166
167#endif /* _PPC_KERNEL_M8260_PCI_H */