2 * This file is part of OMAP DSP driver (DSP Gateway version 3.3.1)
4 * Copyright (C) 2002-2006 Nokia Corporation. All rights reserved.
6 * Contact: Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com>
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.
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.
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
25 * mailbox command: 0x00 - 0x7f
26 * when a driver wants to use mailbox, it must reserve mailbox commands here.
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
55 * DSP mailbox protocol definitions
57 #define MBPROT_REVISION 0x0019
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
65 #define RUNLEVEL_USER 0x01
66 #define RUNLEVEL_SUPER 0x0e
67 #define RUNLEVEL_RECOVERY 0x10
69 #define PM_DISABLE 0x00
70 #define PM_ENABLE 0x01
72 #define KFUNC_FBCTL 0x00
73 #define KFUNC_POWER 0x01
75 #define FBCTL_UPD 0x0000
76 #define FBCTL_ENABLE 0x0002
77 #define FBCTL_DISABLE 0x0003
80 #define AUDIO_PWR_UP 0x0000 /* ARM(exe/ack) <-> DSP(req) */
81 #define AUDIO_PWR_DOWN 0x0001 /* ARM(exe) <- DSP(req) */
82 #define AUDIO_PWR_DOWN1 AUDIO_PWR_DOWN
83 #define AUDIO_PWR_DOWN2 0x0002
84 #define DSP_PWR_UP 0x0003 /* ARM(exe/snd) -> DSP(exe) */
85 #define DSP_PWR_DOWN 0x0004 /* ARM(exe) <- DSP(req) */
86 #define DVFS_START 0x0006 /* ARM(req) <-> DSP(exe/ack)*/
87 #define DVFS_STOP 0x0007 /* ARM(req) -> DSP(exe) */
89 #define TDEL_SAFE 0x0000
90 #define TDEL_KILL 0x0001
92 #define DSPCFG_REQ 0x00
93 #define DSPCFG_SYSADRH 0x28
94 #define DSPCFG_SYSADRL 0x29
95 #define DSPCFG_PROTREV 0x70
96 #define DSPCFG_ABORT 0x78
97 #define DSPCFG_LAST 0x80
99 #define REGRW_MEMR 0x00
100 #define REGRW_MEMW 0x01
101 #define REGRW_IOR 0x02
102 #define REGRW_IOW 0x03
103 #define REGRW_DATA 0x04
105 #define VARID_ICRMASK 0x00
106 #define VARID_LOADINFO 0x01
108 #define TTYP_ARCV 0x0001
109 #define TTYP_ASND 0x0002
110 #define TTYP_BKMD 0x0004
111 #define TTYP_BKDM 0x0008
112 #define TTYP_PVMD 0x0010
113 #define TTYP_PVDM 0x0020
115 #define EID_BADTID 0x10
116 #define EID_BADTCN 0x11
117 #define EID_BADBID 0x20
118 #define EID_BADCNT 0x21
119 #define EID_NOTLOCKED 0x22
120 #define EID_STVBUF 0x23
121 #define EID_BADADR 0x24
122 #define EID_BADTCTL 0x30
123 #define EID_BADPARAM 0x50
124 #define EID_FATAL 0x58
125 #define EID_NOMEM 0xc0
126 #define EID_NORES 0xc1
127 #define EID_IPBFULL 0xc2
129 #define EID_TASKNOTRDY 0xe0
130 #define EID_TASKBSY 0xe1
131 #define EID_TASKERR 0xef
132 #define EID_BADCFGTYP 0xf0
133 #define EID_DEBUG 0xf8
134 #define EID_BADSEQ 0xfe
135 #define EID_BADCMD 0xff
139 #define TID_FREE 0xff
140 #define TID_ANON 0xfe
142 #define BID_NULL 0xffff
143 #define BID_PVT 0xfffe