]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - sys/powerpc/mpc85xx/ocpbus.h
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / sys / powerpc / mpc85xx / ocpbus.h
1 /*-
2  * Copyright 2006 by Juniper Networks. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  * 3. The name of the author may not be used to endorse or promote products
13  *    derived from this software without specific prior written permission.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
22  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25  * SUCH DAMAGE.
26  *
27  * $FreeBSD$
28  */
29
30 #ifndef _MACHINE_OCP85XX_H_
31 #define _MACHINE_OCP85XX_H_
32
33 /*
34  * Configuration control and status registers
35  */
36 #define OCP85XX_CCSRBAR         (CCSRBAR_VA + 0x0)
37 #define OCP85XX_BPTR            (CCSRBAR_VA + 0x20)
38
39 /*
40  * E500 Coherency Module registers
41  */
42 #define OCP85XX_EEBPCR          (CCSRBAR_VA + 0x1010)
43
44 /*
45  * Local access registers
46  */
47 #define OCP85XX_LAWBAR(n)       (CCSRBAR_VA + 0xc08 + 0x20 * (n))
48 #define OCP85XX_LAWSR(n)        (CCSRBAR_VA + 0xc10 + 0x20 * (n))
49
50 #define OCP85XX_TGTIF_PCI0      0
51 #define OCP85XX_TGTIF_PCI1      1
52 #define OCP85XX_TGTIF_PCI2      2
53 #define OCP85XX_TGTIF_PCI3      3
54 #define OCP85XX_TGTIF_LBC       4
55 #define OCP85XX_TGTIF_RAM_INTL  11
56 #define OCP85XX_TGTIF_RIO       12
57 #define OCP85XX_TGTIF_RAM1      15
58 #define OCP85XX_TGTIF_RAM2      22
59
60 /*
61  * L2 cache registers
62  */
63 #define OCP85XX_L2CTL           (CCSRBAR_VA + 0x20000)
64
65 /*
66  * Power-On Reset configuration
67  */
68 #define OCP85XX_PORDEVSR        (CCSRBAR_VA + 0xe000c)
69 #define OCP85XX_PORDEVSR2       (CCSRBAR_VA + 0xe0014)
70
71 /*
72  * Status Registers.
73  */
74 #define OCP85XX_RSTCR           (CCSRBAR_VA + 0xe00b0)
75
76 /*
77  * OCP Bus Definitions
78  */
79 #define OCP85XX_I2C0_OFF        0x03000
80 #define OCP85XX_I2C1_OFF        0x03100
81 #define OCP85XX_I2C_SIZE        0x16
82 #define OCP85XX_UART0_OFF       0x04500
83 #define OCP85XX_UART1_OFF       0x04600
84 #define OCP85XX_UART_SIZE       0x10
85 #define OCP85XX_LBC_OFF         0x05000
86 #define OCP85XX_LBC_SIZE        0x1000
87 #define OCP85XX_PCI0_OFF        0x08000
88 #define OCP85XX_PCI1_OFF        0x09000
89 #define OCP85XX_PCI2_OFF        0x0A000
90 #define OCP85XX_PCI3_OFF        0x0B000
91 #define OCP85XX_PCI_SIZE        0x1000
92 #define OCP85XX_TSEC0_OFF       0x24000
93 #define OCP85XX_TSEC1_OFF       0x25000
94 #define OCP85XX_TSEC2_OFF       0x26000
95 #define OCP85XX_TSEC3_OFF       0x27000
96 #define OCP85XX_TSEC_SIZE       0x1000
97 #define OCP85XX_OPENPIC_OFF     0x40000
98 #define OCP85XX_OPENPIC_SIZE    0x200B4
99 #define OCP85XX_QUICC_OFF       0x80000
100 #define OCP85XX_QUICC_SIZE      0x20000
101 #define OCP85XX_SEC_OFF         0x30000
102 #define OCP85XX_SEC_SIZE        0x10000
103
104 /*
105  * PIC definitions
106  */
107 #define ISA_IRQ_START   0
108 #define PIC_IRQ_START   (ISA_IRQ_START + 16)
109
110 #define ISA_IRQ(n)      (ISA_IRQ_START + (n))
111 #define PIC_IRQ_EXT(n)  (PIC_IRQ_START + (n))
112 #define PIC_IRQ_INT(n)  (PIC_IRQ_START + 16 + (n))
113
114 #endif /* _MACHINE_OCP85XX_H */