Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | /* |
2 | * ========== Copyright Header Begin ========================================== | |
3 | * | |
4 | * OpenSPARC T2 Processor File: bobo_defines.h | |
5 | * Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved | |
6 | * 4150 Network Circle, Santa Clara, California 95054, U.S.A. | |
7 | * | |
8 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
9 | * | |
10 | * This program is free software; you can redistribute it and/or modify | |
11 | * it under the terms of the GNU General Public License as published by | |
12 | * the Free Software Foundation; version 2 of the License. | |
13 | * | |
14 | * This program is distributed in the hope that it will be useful, | |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | * GNU General Public License for more details. | |
18 | * | |
19 | * You should have received a copy of the GNU General Public License | |
20 | * along with this program; if not, write to the Free Software | |
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
22 | * | |
23 | * For the avoidance of doubt, and except that if any non-GPL license | |
24 | * choice is available it will apply instead, Sun elects to use only | |
25 | * the General Public License version 2 (GPLv2) at this time for any | |
26 | * software where a choice of GPL license versions is made | |
27 | * available with the language indicating that GPLv2 or any later version | |
28 | * may be used, or where a choice of which version of the GPL is applied is | |
29 | * otherwise unspecified. | |
30 | * | |
31 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
32 | * CA 95054 USA or visit www.sun.com if you need additional information or | |
33 | * have any questions. | |
34 | * | |
35 | * | |
36 | * ========== Copyright Header End ============================================ | |
37 | */ | |
38 | #ifndef __BOBO_DEFINES_H__ | |
39 | #define __BOBO_DEFINES_H__ | |
40 | ||
41 | /* All of the following are relative to the BOBO base address, | |
42 | which is 0xc800000000 (physical address) */ | |
43 | ||
44 | #define BOBO_REG_BASE 0x00000 | |
45 | #define BOBO_PIW_BASE 0x02000 | |
46 | #define BOBO_INTR_BASE 0x06000 | |
47 | #define BOBO_ENGINE_BASE0 0x10000 | |
48 | #define BOBO_ENGINE_SIZE 0x02000 | |
49 | #define BOBO_ENGINE_BASE1 eval(BOBO_ENGINE_BASE0 + 1*BOBO_ENGINE_SIZE) | |
50 | #define BOBO_ENGINE_BASE2 eval(BOBO_ENGINE_BASE0 + 2*BOBO_ENGINE_SIZE) | |
51 | #define BOBO_ENGINE_BASE3 eval(BOBO_ENGINE_BASE0 + 3*BOBO_ENGINE_SIZE) | |
52 | #define BOBO_ENGINE_BASE4 eval(BOBO_ENGINE_BASE0 + 4*BOBO_ENGINE_SIZE) | |
53 | #define BOBO_ENGINE_BASE5 eval(BOBO_ENGINE_BASE0 + 5*BOBO_ENGINE_SIZE) | |
54 | #define BOBO_ENGINE_BASE6 eval(BOBO_ENGINE_BASE0 + 6*BOBO_ENGINE_SIZE) | |
55 | #define BOBO_ENGINE_BASE7 eval(BOBO_ENGINE_BASE0 + 7*BOBO_ENGINE_SIZE) | |
56 | ||
57 | #define BOBO_INTR_VECT_STATUS_OFFSET eval(BOBO_REG_BASE + 0x7000) | |
58 | ||
59 | /* The following are relative to BOBO_ENGINE_BASEx */ | |
60 | #define BOBO_ENGINE_SADDR_LO_OFFSET 0x00 | |
61 | #define BOBO_ENGINE_SADDR_HI_OFFSET 0x04 | |
62 | #define BOBO_ENGINE_DADDR_LO_OFFSET 0x08 | |
63 | #define BOBO_ENGINE_DADDR_HI_OFFSET 0x0C | |
64 | #define BOBO_ENGINE_XFER_BYTE_COUNT_OFFSET 0x10 | |
65 | #define BOBO_ENGINE_DMA_REPETITION_OFFSET 0x14 | |
66 | #define BOBO_ENGINE_REQ_SIZE_OFFSET 0x18 | |
67 | #define BOBO_ENGINE_ADDR_STRIDE_OFFSET 0x1C | |
68 | #define BOBO_ENGINE_REQ_DELAY_OFFSET 0x20 | |
69 | #define BOBO_ENGINE_PATTERN_CONTROL_OFFSET 0x24 | |
70 | #define BOBO_ENGINE_PATTERN_DATA_OFFSET 0x28 | |
71 | #define BOBO_ENGINE_END_INTR_OFFSET 0x2C | |
72 | #define BOBO_ENGINE_OPERATION_OFFSET 0x40 | |
73 | #define BOBO_ENGINE_STATUS_OFFSET 0x70 | |
74 | ||
75 | #define BOBO_ENGINE_REQ_SIZE_MAX_REQ_SHIFT 16 | |
76 | #define BOBO_ENGINE_REQ_SIZE_MIN_REQ_SHIFT 0 | |
77 | ||
78 | #define BOBO_ENGINE_END_INTR_ENABLE (1<<31) | |
79 | #define BOBO_ENGINE_END_INTR_INT_TYPE_INTX eval(1<<29) | |
80 | #define BOBO_ENGINE_END_INTR_VECTOR_SHIFT 16 | |
81 | ||
82 | #define BOBO_ENGINE_OPERATION_OP_MR eval(1<<24) | |
83 | #define BOBO_ENGINE_OPERATION_OP_MW eval(2<<24) | |
84 | #define BOBO_ENGINE_OPERATION_OP_INTR eval(3<<24) | |
85 | ||
86 | #endif /* __BOBO_DEFINES_H__ */ |