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