]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/powerpc/mpc85xx/ocpbus.h
Improve handling of Local Access Windows on MPC85xx systems:
[FreeBSD/FreeBSD.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  * Local access registers.
35  */
36 #define OCP85XX_LAWBAR(n)       (CCSRBAR_VA + 0xc08 + 0x20 * (n))
37 #define OCP85XX_LAWSR(n)        (CCSRBAR_VA + 0xc10 + 0x20 * (n))
38
39 #define OCP85XX_TGTIF_PCI0      0
40 #define OCP85XX_TGTIF_PCI1      1
41 #define OCP85XX_TGTIF_PCI2      2
42 #define OCP85XX_TGTIF_LBC       4
43 #define OCP85XX_TGTIF_RAM_INTL  11
44 #define OCP85XX_TGTIF_RIO       12
45 #define OCP85XX_TGTIF_RAM1      15
46 #define OCP85XX_TGTIF_RAM2      22
47
48 /*
49  * Power-On Reset configuration.
50  */
51 #define OCP85XX_PORDEVSR        (CCSRBAR_VA + 0xe000c)
52 #define OCP85XX_PORDEVSR2       (CCSRBAR_VA + 0xe0014)
53
54 /*
55  * OCP Bus Definitions
56  */
57 #define OCP85XX_I2C0_OFF        0x03000
58 #define OCP85XX_I2C1_OFF        0x03100
59 #define OCP85XX_I2C_SIZE        0x15
60 #define OCP85XX_UART0_OFF       0x04500
61 #define OCP85XX_UART1_OFF       0x04600
62 #define OCP85XX_UART_SIZE       0x10
63 #define OCP85XX_LBC_OFF         0x05000
64 #define OCP85XX_LBC_SIZE        0x1000
65 #define OCP85XX_PCI0_OFF        0x08000
66 #define OCP85XX_PCI1_OFF        0x09000
67 #define OCP85XX_PCI2_OFF        0x0A000
68 #define OCP85XX_PCI_SIZE        0x1000
69 #define OCP85XX_TSEC0_OFF       0x24000
70 #define OCP85XX_TSEC1_OFF       0x25000
71 #define OCP85XX_TSEC2_OFF       0x26000
72 #define OCP85XX_TSEC3_OFF       0x27000
73 #define OCP85XX_TSEC_SIZE       0x1000
74 #define OCP85XX_OPENPIC_OFF     0x40000
75 #define OCP85XX_OPENPIC_SIZE    0x200B4
76 #define OCP85XX_QUICC_OFF       0x80000
77 #define OCP85XX_QUICC_SIZE      0x20000
78
79 /*
80  * PIC definitions
81  */
82 #define ISA_IRQ_START   0
83 #define PIC_IRQ_START   (ISA_IRQ_START + 16)
84
85 #define ISA_IRQ(n)      (ISA_IRQ_START + (n))
86 #define PIC_IRQ_EXT(n)  (PIC_IRQ_START + (n))
87 #define PIC_IRQ_INT(n)  (PIC_IRQ_START + 16 + (n))
88
89 #endif /* _MACHINE_OCP85XX_H */