]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/dsp/dspgateway/dsp_mbcmd.h
fb3574932584da313573b3a2aac1274ae0857366
[linux-2.6-omap-h63xx.git] / drivers / dsp / dspgateway / dsp_mbcmd.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 __PLAT_OMAP_DSP_MBCMD_H
25 #define __PLAT_OMAP_DSP_MBCMD_H
26 /*
27  * mailbox command: 0x00 - 0x7f
28  * when a driver wants to use mailbox, it must reserve mailbox commands here.
29  */
30 #define MBOX_CMD_DSP_WDSND      0x10
31 #define MBOX_CMD_DSP_WDREQ      0x11
32 #define MBOX_CMD_DSP_BKSND      0x20
33 #define MBOX_CMD_DSP_BKREQ      0x21
34 #define MBOX_CMD_DSP_BKYLD      0x23
35 #define MBOX_CMD_DSP_BKSNDP     0x24
36 #define MBOX_CMD_DSP_BKREQP     0x25
37 #define MBOX_CMD_DSP_TCTL       0x30
38 #define MBOX_CMD_DSP_TCTLDATA   0x31
39 #define MBOX_CMD_DSP_POLL       0x32
40 #define MBOX_CMD_DSP_WDT        0x50
41 #define MBOX_CMD_DSP_RUNLEVEL   0x51
42 #define MBOX_CMD_DSP_PM         0x52
43 #define MBOX_CMD_DSP_SUSPEND    0x53
44 #define MBOX_CMD_DSP_KFUNC      0x54
45 #define MBOX_CMD_DSP_TCFG       0x60
46 #define MBOX_CMD_DSP_TADD       0x62
47 #define MBOX_CMD_DSP_TDEL       0x63
48 #define MBOX_CMD_DSP_TSTOP      0x65
49 #define MBOX_CMD_DSP_DSPCFG     0x70
50 #define MBOX_CMD_DSP_REGRW      0x72
51 #define MBOX_CMD_DSP_GETVAR     0x74
52 #define MBOX_CMD_DSP_SETVAR     0x75
53 #define MBOX_CMD_DSP_ERR        0x78
54 #define MBOX_CMD_DSP_DBG        0x79
55
56 /*
57  * DSP mailbox protocol definitions
58  */
59 #define MBPROT_REVISION 0x0019
60
61 #define TCTL_TINIT              0x0000
62 #define TCTL_TEN                0x0001
63 #define TCTL_TDIS               0x0002
64 #define TCTL_TCLR               0x0003
65 #define TCTL_TCLR_FORCE         0x0004
66
67 #define RUNLEVEL_USER           0x01
68 #define RUNLEVEL_SUPER          0x0e
69 #define RUNLEVEL_RECOVERY       0x10
70
71 #define PM_DISABLE              0x00
72 #define PM_ENABLE               0x01
73
74 #define KFUNC_FBCTL             0x00
75 #define KFUNC_POWER             0x01
76
77 #define FBCTL_UPD               0x0000
78 #define FBCTL_ENABLE            0x0002
79 #define FBCTL_DISABLE           0x0003
80
81 /* KFUNC_POWER */
82 #define AUDIO_PWR_UP            0x0000  /* ARM(exe/ack) <->  DSP(req)   */
83 #define AUDIO_PWR_DOWN          0x0001  /* ARM(exe)     <-  DSP(req)    */
84 #define AUDIO_PWR_DOWN1         AUDIO_PWR_DOWN
85 #define AUDIO_PWR_DOWN2         0x0002
86 #define DSP_PWR_UP              0x0003  /* ARM(exe/snd) ->  DSP(exe)    */
87 #define DSP_PWR_DOWN            0x0004  /* ARM(exe)     <-  DSP(req)    */
88 #define DVFS_START              0x0006  /* ARM(req)     <-> DSP(exe/ack)*/
89 #define DVFS_STOP               0x0007  /* ARM(req)      -> DSP(exe)    */
90
91 #define TDEL_SAFE               0x0000
92 #define TDEL_KILL               0x0001
93
94 #define DSPCFG_REQ              0x00
95 #define DSPCFG_SYSADRH          0x28
96 #define DSPCFG_SYSADRL          0x29
97 #define DSPCFG_PROTREV          0x70
98 #define DSPCFG_ABORT            0x78
99 #define DSPCFG_LAST             0x80
100
101 #define REGRW_MEMR              0x00
102 #define REGRW_MEMW              0x01
103 #define REGRW_IOR               0x02
104 #define REGRW_IOW               0x03
105 #define REGRW_DATA              0x04
106
107 #define VARID_ICRMASK           0x00
108 #define VARID_LOADINFO          0x01
109
110 #define TTYP_ARCV               0x0001
111 #define TTYP_ASND               0x0002
112 #define TTYP_BKMD               0x0004
113 #define TTYP_BKDM               0x0008
114 #define TTYP_PVMD               0x0010
115 #define TTYP_PVDM               0x0020
116
117 #define EID_BADTID              0x10
118 #define EID_BADTCN              0x11
119 #define EID_BADBID              0x20
120 #define EID_BADCNT              0x21
121 #define EID_NOTLOCKED           0x22
122 #define EID_STVBUF              0x23
123 #define EID_BADADR              0x24
124 #define EID_BADTCTL             0x30
125 #define EID_BADPARAM            0x50
126 #define EID_FATAL               0x58
127 #define EID_NOMEM               0xc0
128 #define EID_NORES               0xc1
129 #define EID_IPBFULL             0xc2
130 #define EID_WDT                 0xd0
131 #define EID_TASKNOTRDY          0xe0
132 #define EID_TASKBSY             0xe1
133 #define EID_TASKERR             0xef
134 #define EID_BADCFGTYP           0xf0
135 #define EID_DEBUG               0xf8
136 #define EID_BADSEQ              0xfe
137 #define EID_BADCMD              0xff
138
139 #define TNM_LEN                 16
140
141 #define TID_FREE                0xff
142 #define TID_ANON                0xfe
143
144 #define BID_NULL                0xffff
145 #define BID_PVT                 0xfffe
146
147 #endif /* __PLAT_OMAP_DSP_MBCMD_H */