]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/arm/plat-omap/dsp/omap2_dsp.h
OMAP:DSP: plat-omap dsp updates for 3430
[linux-2.6-omap-h63xx.git] / arch / arm / plat-omap / dsp / omap2_dsp.h
1 /*
2  * This file is part of OMAP DSP driver (DSP Gateway version 3.3.1)
3  *
4  * Copyright (C) 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_OMAP2_DSP_H
25 #define __OMAP_DSP_OMAP2_DSP_H
26
27 #ifdef CONFIG_ARCH_OMAP24XX
28 #define OMAP24XX_DARAM_BASE     (DSP_MEM_24XX_VIRT + 0x0)
29 #define OMAP24XX_DARAM_SIZE     0x10000
30 #define OMAP24XX_SARAM_BASE     (DSP_MEM_24XX_VIRT + 0x10000)
31 #define OMAP24XX_SARAM_SIZE     0x18000
32 #endif
33
34 #include <asm/arch/hardware.h>
35
36 /*
37  * DSP IPI registers: mapped to 0xe1000000 -- use readX(), writeX()
38  */
39 #ifdef CONFIG_ARCH_OMAP24XX
40 #define DSP_IPI_BASE                    DSP_IPI_24XX_VIRT
41 #endif
42
43 #ifdef CONFIG_ARCH_OMAP34XX
44 #define DSP_IPI_BASE                    DSP_IPI_34XX_VIRT
45 #endif
46
47 #define DSP_IPI_REVISION                (DSP_IPI_BASE + 0x00)
48 #define DSP_IPI_SYSCONFIG               (DSP_IPI_BASE + 0x10)
49 #define DSP_IPI_INDEX                   (DSP_IPI_BASE + 0x40)
50 #define DSP_IPI_ENTRY                   (DSP_IPI_BASE + 0x44)
51 #define DSP_IPI_ENABLE                  (DSP_IPI_BASE + 0x48)
52 #define DSP_IPI_IOMAP                   (DSP_IPI_BASE + 0x4c)
53 #define DSP_IPI_DSPBOOTCONFIG           (DSP_IPI_BASE + 0x50)
54
55 #define DSP_IPI_ENTRY_ELMSIZEVALUE_MASK 0x00000003
56 #define DSP_IPI_ENTRY_ELMSIZEVALUE_8    0x00000000
57 #define DSP_IPI_ENTRY_ELMSIZEVALUE_16   0x00000001
58 #define DSP_IPI_ENTRY_ELMSIZEVALUE_32   0x00000002
59
60 #define DSP_BOOT_CONFIG_DIRECT          0x00000000
61 #define DSP_BOOT_CONFIG_PSD_DIRECT      0x00000001
62 #define DSP_BOOT_CONFIG_IDLE            0x00000002
63 #define DSP_BOOT_CONFIG_DL16            0x00000003
64 #define DSP_BOOT_CONFIG_DL32            0x00000004
65 #define DSP_BOOT_CONFIG_API             0x00000005
66 #define DSP_BOOT_CONFIG_INTERNAL        0x00000006
67
68 /*
69  * DSP boot mode
70  *   direct:        0xffff00
71  *   pseudo direct: 0x080000
72  *   API:           branch 0x010000
73  *   internel:      branch 0x024000
74  */
75 #define DSP_BOOT_ADR_DIRECT             0xffff00
76 #define DSP_BOOT_ADR_PSD_DIRECT         0x080000
77 #define DSP_BOOT_ADR_API                0x010000
78 #define DSP_BOOT_ADR_INTERNAL           0x024000
79
80 /*
81  * DSP MMU: mapped to 0xe2000000 -- use readX(), writeX()
82  */
83 #define DSP_MMU_BASE                    DSP_MMU_24XX_VIRT
84 #define DSP_MMU_REVISION                (DSP_MMU_BASE + 0x00)
85 #define DSP_MMU_SYSCONFIG               (DSP_MMU_BASE + 0x10)
86 #define DSP_MMU_SYSSTATUS               (DSP_MMU_BASE + 0x14)
87 #define DSP_MMU_IRQSTATUS               (DSP_MMU_BASE + 0x18)
88 #define DSP_MMU_IRQENABLE               (DSP_MMU_BASE + 0x1c)
89 #define DSP_MMU_WALKING_ST              (DSP_MMU_BASE + 0x40)
90 #define DSP_MMU_CNTL                    (DSP_MMU_BASE + 0x44)
91 #define DSP_MMU_FAULT_AD                (DSP_MMU_BASE + 0x48)
92 #define DSP_MMU_TTB                     (DSP_MMU_BASE + 0x4c)
93 #define DSP_MMU_LOCK                    (DSP_MMU_BASE + 0x50)
94 #define DSP_MMU_LD_TLB                  (DSP_MMU_BASE + 0x54)
95 #define DSP_MMU_CAM                     (DSP_MMU_BASE + 0x58)
96 #define DSP_MMU_RAM                     (DSP_MMU_BASE + 0x5c)
97 #define DSP_MMU_GFLUSH                  (DSP_MMU_BASE + 0x60)
98 #define DSP_MMU_FLUSH_ENTRY             (DSP_MMU_BASE + 0x64)
99 #define DSP_MMU_READ_CAM                (DSP_MMU_BASE + 0x68)
100 #define DSP_MMU_READ_RAM                (DSP_MMU_BASE + 0x6c)
101 #define DSP_MMU_EMU_FAULT_AD            (DSP_MMU_BASE + 0x70)
102
103 #define DSP_MMU_SYSCONFIG_CLOCKACTIVITY_MASK    0x00000300
104 #define DSP_MMU_SYSCONFIG_IDLEMODE_MASK         0x00000018
105 #define DSP_MMU_SYSCONFIG_SOFTRESET             0x00000002
106 #define DSP_MMU_SYSCONFIG_AUTOIDLE              0x00000001
107
108 #define DSP_MMU_IRQ_MULTIHITFAULT       0x00000010
109 #define DSP_MMU_IRQ_TABLEWALKFAULT      0x00000008
110 #define DSP_MMU_IRQ_EMUMISS             0x00000004
111 #define DSP_MMU_IRQ_TRANSLATIONFAULT    0x00000002
112 #define DSP_MMU_IRQ_TLBMISS             0x00000001
113
114 #define DSP_MMU_CNTL_EMUTLBUPDATE       0x00000008
115 #define DSP_MMU_CNTL_TWLENABLE          0x00000004
116 #define DSP_MMU_CNTL_MMUENABLE          0x00000002
117
118 #define DSP_MMU_LOCK_BASE_MASK          0x00007c00
119 #define DSP_MMU_LOCK_BASE_SHIFT         10
120 #define DSP_MMU_LOCK_VICTIM_MASK        0x000001f0
121 #define DSP_MMU_LOCK_VICTIM_SHIFT       4
122
123 #define DSP_MMU_CAM_VATAG_MASK          0xfffff000
124 #define DSP_MMU_CAM_P                   0x00000008
125 #define DSP_MMU_CAM_V                   0x00000004
126 #define DSP_MMU_CAM_PAGESIZE_MASK       0x00000003
127 #define DSP_MMU_CAM_PAGESIZE_1MB        0x00000000
128 #define DSP_MMU_CAM_PAGESIZE_64KB       0x00000001
129 #define DSP_MMU_CAM_PAGESIZE_4KB        0x00000002
130 #define DSP_MMU_CAM_PAGESIZE_16MB       0x00000003
131
132 #define DSP_MMU_RAM_PADDR_MASK          0xfffff000
133 #define DSP_MMU_RAM_ENDIANNESS          0x00000200
134 #define DSP_MMU_RAM_ENDIANNESS_BIG      0x00000200
135 #define DSP_MMU_RAM_ENDIANNESS_LITTLE   0x00000000
136 #define DSP_MMU_RAM_ELEMENTSIZE_MASK    0x00000180
137 #define DSP_MMU_RAM_ELEMENTSIZE_8       0x00000000
138 #define DSP_MMU_RAM_ELEMENTSIZE_16      0x00000080
139 #define DSP_MMU_RAM_ELEMENTSIZE_32      0x00000100
140 #define DSP_MMU_RAM_ELEMENTSIZE_NONE    0x00000180
141 #define DSP_MMU_RAM_MIXED               0x00000040
142
143 #define DSP_MMU_GFLUSH_GFLUSH           0x00000001
144
145 #define DSP_MMU_FLUSH_ENTRY_FLUSH_ENTRY 0x00000001
146
147 #define DSP_MMU_LD_TLB_LD               0x00000001
148
149 /*
150  * DSP ICR
151  */
152 #define DSPREG_ICR_RESERVED_BITS        0xfc00
153 #define DSPREG_ICR_HWA                  0x0200
154 #define DSPREG_ICR_IPORT                0x0100
155 #define DSPREG_ICR_MPORT                0x0080
156 #define DSPREG_ICR_XPORT                0x0040
157 #define DSPREG_ICR_DPORT                0x0020
158 #define DSPREG_ICR_DPLL                 0x0010
159 #define DSPREG_ICR_PER                  0x0008
160 #define DSPREG_ICR_CACHE                0x0004
161 #define DSPREG_ICR_DMA                  0x0002
162 #define DSPREG_ICR_CPU                  0x0001
163
164 #endif /* __OMAP_DSP_OMAP2_DSP_H */