dsp.h
上传用户:szlgq88
上传日期:2009-04-28
资源大小:48287k
文件大小:7k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /*
  2.  * linux/include/asm-arm/arch-omap/dsp.h
  3.  *
  4.  * Header for OMAP DSP driver
  5.  *
  6.  * Copyright (C) 2002-2005 Nokia Corporation
  7.  *
  8.  * Written by Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com>
  9.  *
  10.  * This program is free software; you can redistribute it and/or modify
  11.  * it under the terms of the GNU General Public License as published by
  12.  * the Free Software Foundation; either version 2 of the License, or
  13.  * (at your option) any later version.
  14.  *
  15.  * This program is distributed in the hope that it will be useful,
  16.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18.  * GNU General Public License for more details.
  19.  *
  20.  * You should have received a copy of the GNU General Public License
  21.  * along with this program; if not, write to the Free Software
  22.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  23.  *
  24.  * 2005/06/01:  DSP Gateway version 3.3
  25.  */
  26. #ifndef ASM_ARCH_DSP_H
  27. #define ASM_ARCH_DSP_H
  28. /*
  29.  * for /dev/dspctl/ctl
  30.  */
  31. #define OMAP_DSP_IOCTL_RESET 1
  32. #define OMAP_DSP_IOCTL_RUN 2
  33. #define OMAP_DSP_IOCTL_SETRSTVECT 3
  34. #define OMAP_DSP_IOCTL_CPU_IDLE 4
  35. #define OMAP_DSP_IOCTL_MPUI_WORDSWAP_ON 5
  36. #define OMAP_DSP_IOCTL_MPUI_WORDSWAP_OFF 6
  37. #define OMAP_DSP_IOCTL_MPUI_BYTESWAP_ON 7
  38. #define OMAP_DSP_IOCTL_MPUI_BYTESWAP_OFF 8
  39. #define OMAP_DSP_IOCTL_GBL_IDLE 9
  40. #define OMAP_DSP_IOCTL_DSPCFG 10
  41. #define OMAP_DSP_IOCTL_DSPUNCFG 11
  42. #define OMAP_DSP_IOCTL_TASKCNT 12
  43. #define OMAP_DSP_IOCTL_POLL 13
  44. #define OMAP_DSP_IOCTL_REGMEMR 40
  45. #define OMAP_DSP_IOCTL_REGMEMW 41
  46. #define OMAP_DSP_IOCTL_REGIOR 42
  47. #define OMAP_DSP_IOCTL_REGIOW 43
  48. #define OMAP_DSP_IOCTL_GETVAR 44
  49. #define OMAP_DSP_IOCTL_SETVAR 45
  50. #define OMAP_DSP_IOCTL_RUNLEVEL 50
  51. #define OMAP_DSP_IOCTL_SUSPEND 51
  52. #define OMAP_DSP_IOCTL_RESUME 52
  53. #define OMAP_DSP_IOCTL_FBEN 53
  54. #define OMAP_DSP_IOCTL_FBDIS 54
  55. #define OMAP_DSP_IOCTL_MBSEND 99
  56. /*
  57.  * for taskdev
  58.  * (ioctls below should be >= 0x10000)
  59.  */
  60. #define OMAP_DSP_TASK_IOCTL_BFLSH 0x10000
  61. #define OMAP_DSP_TASK_IOCTL_SETBSZ 0x10001
  62. #define OMAP_DSP_TASK_IOCTL_LOCK 0x10002
  63. #define OMAP_DSP_TASK_IOCTL_UNLOCK 0x10003
  64. #define OMAP_DSP_TASK_IOCTL_GETNAME 0x10004
  65. /*
  66.  * for /dev/dspctl/mem
  67.  */
  68. #define OMAP_DSP_MEM_IOCTL_EXMAP 1
  69. #define OMAP_DSP_MEM_IOCTL_EXUNMAP 2
  70. #define OMAP_DSP_MEM_IOCTL_EXMAP_FLUSH 3
  71. #define OMAP_DSP_MEM_IOCTL_FBEXPORT 5
  72. #define OMAP_DSP_MEM_IOCTL_MMUITACK 7
  73. #define OMAP_DSP_MEM_IOCTL_MMUINIT 9
  74. #define OMAP_DSP_MEM_IOCTL_KMEM_RESERVE 11
  75. #define OMAP_DSP_MEM_IOCTL_KMEM_RELEASE 12
  76. struct omap_dsp_mapinfo {
  77. unsigned long dspadr;
  78. unsigned long size;
  79. };
  80. /*
  81.  * for /dev/dspctl/twch
  82.  */
  83. #define OMAP_DSP_TWCH_IOCTL_MKDEV 1
  84. #define OMAP_DSP_TWCH_IOCTL_RMDEV 2
  85. #define OMAP_DSP_TWCH_IOCTL_TADD 11
  86. #define OMAP_DSP_TWCH_IOCTL_TDEL 12
  87. #define OMAP_DSP_TWCH_IOCTL_TKILL 13
  88. #define OMAP_DSP_DEVSTATE_NOTASK 0x00000001
  89. #define OMAP_DSP_DEVSTATE_ATTACHED 0x00000002
  90. #define OMAP_DSP_DEVSTATE_GARBAGE 0x00000004
  91. #define OMAP_DSP_DEVSTATE_INVALID 0x00000008
  92. #define OMAP_DSP_DEVSTATE_ADDREQ 0x00000100
  93. #define OMAP_DSP_DEVSTATE_DELREQ 0x00000200
  94. #define OMAP_DSP_DEVSTATE_ADDFAIL 0x00001000
  95. #define OMAP_DSP_DEVSTATE_ADDING 0x00010000
  96. #define OMAP_DSP_DEVSTATE_DELING 0x00020000
  97. #define OMAP_DSP_DEVSTATE_KILLING 0x00040000
  98. #define OMAP_DSP_DEVSTATE_STATE_MASK 0x7fffffff
  99. #define OMAP_DSP_DEVSTATE_STALE 0x80000000
  100. struct omap_dsp_taddinfo {
  101. unsigned char minor;
  102. unsigned long taskadr;
  103. };
  104. #define OMAP_DSP_TADD_ABORTADR 0xffffffff
  105. /*
  106.  * error cause definition (for error detection device)
  107.  */
  108. #define OMAP_DSP_ERRDT_WDT 0x00000001
  109. #define OMAP_DSP_ERRDT_MMU 0x00000002
  110. /*
  111.  * mailbox protocol definitions
  112.  */
  113. struct omap_dsp_mailbox_cmd {
  114. unsigned short cmd;
  115. unsigned short data;
  116. };
  117. struct omap_dsp_reginfo {
  118. unsigned short adr;
  119. unsigned short val;
  120. };
  121. struct omap_dsp_varinfo {
  122. unsigned char varid;
  123. unsigned short val[0];
  124. };
  125. #define OMAP_DSP_MBPROT_REVISION 0x0019
  126. #define OMAP_DSP_MBCMD_WDSND 0x10
  127. #define OMAP_DSP_MBCMD_WDREQ 0x11
  128. #define OMAP_DSP_MBCMD_BKSND 0x20
  129. #define OMAP_DSP_MBCMD_BKREQ 0x21
  130. #define OMAP_DSP_MBCMD_BKYLD 0x23
  131. #define OMAP_DSP_MBCMD_BKSNDP 0x24
  132. #define OMAP_DSP_MBCMD_BKREQP 0x25
  133. #define OMAP_DSP_MBCMD_TCTL 0x30
  134. #define OMAP_DSP_MBCMD_TCTLDATA 0x31
  135. #define OMAP_DSP_MBCMD_POLL 0x32
  136. #define OMAP_DSP_MBCMD_WDT 0x50 /* v3.3: obsolete */
  137. #define OMAP_DSP_MBCMD_RUNLEVEL 0x51
  138. #define OMAP_DSP_MBCMD_PM 0x52
  139. #define OMAP_DSP_MBCMD_SUSPEND 0x53
  140. #define OMAP_DSP_MBCMD_KFUNC 0x54
  141. #define OMAP_DSP_MBCMD_TCFG 0x60
  142. #define OMAP_DSP_MBCMD_TADD 0x62
  143. #define OMAP_DSP_MBCMD_TDEL 0x63
  144. #define OMAP_DSP_MBCMD_TSTOP 0x65
  145. #define OMAP_DSP_MBCMD_DSPCFG 0x70
  146. #define OMAP_DSP_MBCMD_REGRW 0x72
  147. #define OMAP_DSP_MBCMD_GETVAR 0x74
  148. #define OMAP_DSP_MBCMD_SETVAR 0x75
  149. #define OMAP_DSP_MBCMD_ERR 0x78
  150. #define OMAP_DSP_MBCMD_DBG 0x79
  151. #define OMAP_DSP_MBCMD_TCTL_TINIT 0x0000
  152. #define OMAP_DSP_MBCMD_TCTL_TEN 0x0001
  153. #define OMAP_DSP_MBCMD_TCTL_TDIS 0x0002
  154. #define OMAP_DSP_MBCMD_TCTL_TCLR 0x0003
  155. #define OMAP_DSP_MBCMD_TCTL_TCLR_FORCE 0x0004
  156. #define OMAP_DSP_MBCMD_RUNLEVEL_USER 0x01
  157. #define OMAP_DSP_MBCMD_RUNLEVEL_SUPER 0x0e
  158. #define OMAP_DSP_MBCMD_RUNLEVEL_RECOVERY 0x10
  159. #define OMAP_DSP_MBCMD_PM_DISABLE 0x00
  160. #define OMAP_DSP_MBCMD_PM_ENABLE 0x01
  161. #define OMAP_DSP_MBCMD_KFUNC_FBCTL 0x00
  162. #define OMAP_DSP_MBCMD_FBCTL_ENABLE 0x0002
  163. #define OMAP_DSP_MBCMD_FBCTL_DISABLE 0x0003
  164. #define OMAP_DSP_MBCMD_TDEL_SAFE 0x0000
  165. #define OMAP_DSP_MBCMD_TDEL_KILL 0x0001
  166. #define OMAP_DSP_MBCMD_DSPCFG_REQ 0x00
  167. #define OMAP_DSP_MBCMD_DSPCFG_SYSADRH 0x28
  168. #define OMAP_DSP_MBCMD_DSPCFG_SYSADRL 0x29
  169. #define OMAP_DSP_MBCMD_DSPCFG_PROTREV 0x70
  170. #define OMAP_DSP_MBCMD_DSPCFG_ABORT 0x78
  171. #define OMAP_DSP_MBCMD_DSPCFG_LAST 0x80
  172. #define OMAP_DSP_MBCMD_REGRW_MEMR 0x00
  173. #define OMAP_DSP_MBCMD_REGRW_MEMW 0x01
  174. #define OMAP_DSP_MBCMD_REGRW_IOR 0x02
  175. #define OMAP_DSP_MBCMD_REGRW_IOW 0x03
  176. #define OMAP_DSP_MBCMD_REGRW_DATA 0x04
  177. #define OMAP_DSP_MBCMD_VARID_ICRMASK 0x00
  178. #define OMAP_DSP_MBCMD_VARID_LOADINFO 0x01
  179. #define OMAP_DSP_TTYP_ARCV 0x0001
  180. #define OMAP_DSP_TTYP_ASND 0x0002
  181. #define OMAP_DSP_TTYP_BKMD 0x0004
  182. #define OMAP_DSP_TTYP_BKDM 0x0008
  183. #define OMAP_DSP_TTYP_PVMD 0x0010
  184. #define OMAP_DSP_TTYP_PVDM 0x0020
  185. #define OMAP_DSP_EID_BADTID 0x10
  186. #define OMAP_DSP_EID_BADTCN 0x11
  187. #define OMAP_DSP_EID_BADBID 0x20
  188. #define OMAP_DSP_EID_BADCNT 0x21
  189. #define OMAP_DSP_EID_NOTLOCKED 0x22
  190. #define OMAP_DSP_EID_STVBUF 0x23
  191. #define OMAP_DSP_EID_BADADR 0x24
  192. #define OMAP_DSP_EID_BADTCTL 0x30
  193. #define OMAP_DSP_EID_BADPARAM 0x50
  194. #define OMAP_DSP_EID_FATAL 0x58
  195. #define OMAP_DSP_EID_NOMEM 0xc0
  196. #define OMAP_DSP_EID_NORES 0xc1
  197. #define OMAP_DSP_EID_IPBFULL 0xc2
  198. #define OMAP_DSP_EID_WDT 0xd0
  199. #define OMAP_DSP_EID_TASKNOTRDY 0xe0
  200. #define OMAP_DSP_EID_TASKBSY 0xe1
  201. #define OMAP_DSP_EID_TASKERR 0xef
  202. #define OMAP_DSP_EID_BADCFGTYP 0xf0
  203. #define OMAP_DSP_EID_DEBUG 0xf8
  204. #define OMAP_DSP_EID_BADSEQ 0xfe
  205. #define OMAP_DSP_EID_BADCMD 0xff
  206. #define OMAP_DSP_TNM_LEN 16
  207. #define OMAP_DSP_TID_FREE 0xff
  208. #define OMAP_DSP_TID_ANON 0xfe
  209. #define OMAP_DSP_BID_NULL 0xffff
  210. #define OMAP_DSP_BID_PVT 0xfffe
  211. #endif /* ASM_ARCH_DSP_H */