]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/arm/plat-omap/dsp/omap1_dsp.h
06a66faa48d683b55ab87d1f58ab9dc6816606c8
[linux-2.6-omap-h63xx.git] / arch / arm / plat-omap / dsp / omap1_dsp.h
1 /*
2  * This file is part of OMAP DSP driver (DSP Gateway version 3.3.1)
3  *
4  * Copyright (C) 2002-2006 Nokia Corporation. All rights reserved.
5  *
6  * Contact: Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com>
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License 
10  * version 2 as published by the Free Software Foundation. 
11  *
12  * This program is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA
21  *
22  */
23
24 #ifndef __OMAP_DSP_OMAP1_DSP_H
25 #define __OMAP_DSP_OMAP1_DSP_H
26
27 #ifdef CONFIG_ARCH_OMAP15XX
28 #define OMAP1510_DARAM_BASE     (OMAP1510_DSP_BASE + 0x0)
29 #define OMAP1510_DARAM_SIZE     0x10000
30 #define OMAP1510_SARAM_BASE     (OMAP1510_DSP_BASE + 0x10000)
31 #define OMAP1510_SARAM_SIZE     0x18000
32 #endif
33
34 #ifdef CONFIG_ARCH_OMAP16XX
35 #define OMAP16XX_DARAM_BASE     (OMAP16XX_DSP_BASE + 0x0)
36 #define OMAP16XX_DARAM_SIZE     0x10000
37 #define OMAP16XX_SARAM_BASE     (OMAP16XX_DSP_BASE + 0x10000)
38 #define OMAP16XX_SARAM_SIZE     0x18000
39 #endif
40
41 /*
42  * Reset Control
43  */
44 #define ARM_RSTCT1_SW_RST               0x0008
45 #define ARM_RSTCT1_DSP_RST              0x0004
46 #define ARM_RSTCT1_DSP_EN               0x0002
47 #define ARM_RSTCT1_ARM_RST              0x0001
48
49 /*
50  * MPUI
51  */
52 #define MPUI_CTRL_WORDSWAP_MASK         0x00600000
53 #define MPUI_CTRL_WORDSWAP_ALL          0x00000000
54 #define MPUI_CTRL_WORDSWAP_NONAPI       0x00200000
55 #define MPUI_CTRL_WORDSWAP_API          0x00400000
56 #define MPUI_CTRL_WORDSWAP_NONE         0x00600000
57 #define MPUI_CTRL_AP_MASK               0x001c0000
58 #define MPUI_CTRL_AP_MDH                0x00000000
59 #define MPUI_CTRL_AP_MHD                0x00040000
60 #define MPUI_CTRL_AP_DMH                0x00080000
61 #define MPUI_CTRL_AP_HMD                0x000c0000
62 #define MPUI_CTRL_AP_DHM                0x00100000
63 #define MPUI_CTRL_AP_HDM                0x00140000
64 #define MPUI_CTRL_BYTESWAP_MASK         0x00030000
65 #define MPUI_CTRL_BYTESWAP_NONE         0x00000000
66 #define MPUI_CTRL_BYTESWAP_NONAPI       0x00010000
67 #define MPUI_CTRL_BYTESWAP_ALL          0x00020000
68 #define MPUI_CTRL_BYTESWAP_API          0x00030000
69 #define MPUI_CTRL_TIMEOUT_MASK          0x0000ff00
70 #define MPUI_CTRL_APIF_HNSTB_DIV_MASK   0x000000f0
71 #define MPUI_CTRL_S_NABORT_GL           0x00000008
72 #define MPUI_CTRL_S_NABORT_32BIT        0x00000004
73 #define MPUI_CTRL_EN_TIMEOUT            0x00000002
74 #define MPUI_CTRL_HF_MCUCLK             0x00000001
75 #define DSP_BOOT_CONFIG_DIRECT          0x00000000
76 #define DSP_BOOT_CONFIG_PSD_DIRECT      0x00000001
77 #define DSP_BOOT_CONFIG_IDLE            0x00000002
78 #define DSP_BOOT_CONFIG_DL16            0x00000003
79 #define DSP_BOOT_CONFIG_DL32            0x00000004
80 #define DSP_BOOT_CONFIG_MPUI            0x00000005
81 #define DSP_BOOT_CONFIG_INTERNAL        0x00000006
82
83 /*
84  * DSP boot mode
85  *   direct:        0xffff00
86  *   pseudo direct: 0x080000
87  *   MPUI:          branch 0x010000
88  *   internel:      branch 0x024000
89  */
90 #define DSP_BOOT_ADR_DIRECT             0xffff00
91 #define DSP_BOOT_ADR_PSD_DIRECT         0x080000
92 #define DSP_BOOT_ADR_MPUI               0x010000
93 #define DSP_BOOT_ADR_INTERNAL           0x024000
94
95 /*
96  * TC
97  */
98 #define TC_ENDIANISM_SWAP               0x00000002
99 #define TC_ENDIANISM_SWAP_WORD          0x00000002
100 #define TC_ENDIANISM_SWAP_BYTE          0x00000000
101 #define TC_ENDIANISM_EN                 0x00000001
102
103 /*
104  * DSP MMU
105  */
106 #define DSP_MMU_BASE                    (0xfffed200)
107 #define DSP_MMU_PREFETCH                (DSP_MMU_BASE + 0x00)
108 #define DSP_MMU_WALKING_ST              (DSP_MMU_BASE + 0x04)
109 #define DSP_MMU_CNTL                    (DSP_MMU_BASE + 0x08)
110 #define DSP_MMU_FAULT_AD_H              (DSP_MMU_BASE + 0x0c)
111 #define DSP_MMU_FAULT_AD_L              (DSP_MMU_BASE + 0x10)
112 #define DSP_MMU_FAULT_ST                (DSP_MMU_BASE + 0x14)
113 #define DSP_MMU_IT_ACK                  (DSP_MMU_BASE + 0x18)
114 #define DSP_MMU_TTB_H                   (DSP_MMU_BASE + 0x1c)
115 #define DSP_MMU_TTB_L                   (DSP_MMU_BASE + 0x20)
116 #define DSP_MMU_LOCK                    (DSP_MMU_BASE + 0x24)
117 #define DSP_MMU_LD_TLB                  (DSP_MMU_BASE + 0x28)
118 #define DSP_MMU_CAM_H                   (DSP_MMU_BASE + 0x2c)
119 #define DSP_MMU_CAM_L                   (DSP_MMU_BASE + 0x30)
120 #define DSP_MMU_RAM_H                   (DSP_MMU_BASE + 0x34)
121 #define DSP_MMU_RAM_L                   (DSP_MMU_BASE + 0x38)
122 #define DSP_MMU_GFLUSH                  (DSP_MMU_BASE + 0x3c)
123 #define DSP_MMU_FLUSH_ENTRY             (DSP_MMU_BASE + 0x40)
124 #define DSP_MMU_READ_CAM_H              (DSP_MMU_BASE + 0x44)
125 #define DSP_MMU_READ_CAM_L              (DSP_MMU_BASE + 0x48)
126 #define DSP_MMU_READ_RAM_H              (DSP_MMU_BASE + 0x4c)
127 #define DSP_MMU_READ_RAM_L              (DSP_MMU_BASE + 0x50)
128
129 #define DSP_MMU_CNTL_BURST_16MNGT_EN    0x0020
130 #define DSP_MMU_CNTL_WTL_EN             0x0004
131 #define DSP_MMU_CNTL_MMU_EN             0x0002
132 #define DSP_MMU_CNTL_RESET_SW           0x0001
133
134 #define DSP_MMU_FAULT_AD_H_DP           0x0100
135 #define DSP_MMU_FAULT_AD_H_ADR_MASK     0x00ff
136
137 #define DSP_MMU_FAULT_ST_PREF           0x0008
138 #define DSP_MMU_FAULT_ST_PERM           0x0004
139 #define DSP_MMU_FAULT_ST_TLB_MISS       0x0002
140 #define DSP_MMU_FAULT_ST_TRANS          0x0001
141
142 #define DSP_MMU_IT_ACK_IT_ACK           0x0001
143
144 #define DSP_MMU_LOCK_BASE_MASK          0xfc00
145 #define DSP_MMU_LOCK_BASE_SHIFT         10
146 #define DSP_MMU_LOCK_VICTIM_MASK        0x03f0
147 #define DSP_MMU_LOCK_VICTIM_SHIFT       4
148
149 #define DSP_MMU_CAM_H_VA_TAG_H_MASK             0x0003
150
151 #define DSP_MMU_CAM_L_VA_TAG_L1_MASK            0xc000
152 #define DSP_MMU_CAM_L_VA_TAG_L2_MASK_1MB        0x0000
153 #define DSP_MMU_CAM_L_VA_TAG_L2_MASK_64KB       0x3c00
154 #define DSP_MMU_CAM_L_VA_TAG_L2_MASK_4KB        0x3fc0
155 #define DSP_MMU_CAM_L_VA_TAG_L2_MASK_1KB        0x3ff0
156 #define DSP_MMU_CAM_L_P                         0x0008
157 #define DSP_MMU_CAM_L_V                         0x0004
158 #define DSP_MMU_CAM_L_PAGESIZE_MASK             0x0003
159 #define DSP_MMU_CAM_L_PAGESIZE_1MB              0x0000
160 #define DSP_MMU_CAM_L_PAGESIZE_64KB             0x0001
161 #define DSP_MMU_CAM_L_PAGESIZE_4KB              0x0002
162 #define DSP_MMU_CAM_L_PAGESIZE_1KB              0x0003
163
164 #define DSP_MMU_RAM_L_RAM_LSB_MASK      0xfc00
165 #define DSP_MMU_RAM_L_AP_MASK           0x0300
166 #define DSP_MMU_RAM_L_AP_NA             0x0000
167 #define DSP_MMU_RAM_L_AP_RO             0x0200
168 #define DSP_MMU_RAM_L_AP_FA             0x0300
169
170 #define DSP_MMU_GFLUSH_GFLUSH           0x0001
171
172 #define DSP_MMU_FLUSH_ENTRY_FLUSH_ENTRY 0x0001
173
174 #define DSP_MMU_LD_TLB_RD               0x0002
175 #define DSP_MMU_LD_TLB_LD               0x0001
176
177 /*
178  * DSP ICR
179  */
180 #define DSPREG_ICR_RESERVED_BITS        0xffc0
181 #define DSPREG_ICR_EMIF                 0x0020
182 #define DSPREG_ICR_DPLL                 0x0010
183 #define DSPREG_ICR_PER                  0x0008
184 #define DSPREG_ICR_CACHE                0x0004
185 #define DSPREG_ICR_DMA                  0x0002
186 #define DSPREG_ICR_CPU                  0x0001
187
188 #endif /* __OMAP_DSP_OMAP1_DSP_H */