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