• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/staging/tidspbridge/include/dspbridge/
1/*
2 * rms_sh.h
3 *
4 * DSP-BIOS Bridge driver support functions for TI OMAP processors.
5 *
6 * DSP/BIOS Bridge Resource Manager Server shared definitions (used on both
7 * GPP and DSP sides).
8 *
9 * Copyright (C) 2008 Texas Instruments, Inc.
10 *
11 * This package is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 *
15 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
17 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18 */
19
20#ifndef RMS_SH_
21#define RMS_SH_
22
23#include <dspbridge/rmstypes.h>
24
25/* Node Types: */
26#define RMS_TASK                1	/* Task node */
27#define RMS_DAIS                2	/* xDAIS socket node */
28#define RMS_MSG                 3	/* Message node */
29
30/* Memory Types: */
31#define RMS_CODE                0	/* Program space */
32#define RMS_DATA                1	/* Data space */
33#define RMS_IO                	2	/* I/O space */
34
35/* RM Server Command and Response Buffer Sizes: */
36#define RMS_COMMANDBUFSIZE     256	/* Size of command buffer */
37#define RMS_RESPONSEBUFSIZE    16	/* Size of response buffer */
38
39/* Pre-Defined Command/Response Codes: */
40#define RMS_EXIT                0x80000000	/* GPP->Node: shutdown */
41#define RMS_EXITACK             0x40000000	/* Node->GPP: ack shutdown */
42#define RMS_BUFDESC             0x20000000	/* Arg1 SM buf, Arg2 SM size */
43#define RMS_KILLTASK            0x10000000	/* GPP->Node: Kill Task */
44#define RMS_USER                0x0	/* Start of user-defined msg codes */
45#define RMS_MAXUSERCODES        0xfff	/* Maximum user defined C/R Codes */
46
47/* RM Server RPC Command Structure: */
48struct rms_command {
49	rms_word fxn;		/* Server function address */
50	rms_word arg1;		/* First argument */
51	rms_word arg2;		/* Second argument */
52	rms_word data;		/* Function-specific data array */
53};
54
55/*
56 *  The rms_strm_def structure defines the parameters for both input and output
57 *  streams, and is passed to a node's create function.
58 */
59struct rms_strm_def {
60	rms_word bufsize;	/* Buffer size (in DSP words) */
61	rms_word nbufs;		/* Max number of bufs in stream */
62	rms_word segid;		/* Segment to allocate buffers */
63	rms_word align;		/* Alignment for allocated buffers */
64	rms_word timeout;	/* Timeout (msec) for blocking calls */
65	char name[1];	/* Device Name (terminated by '\0') */
66};
67
68/* Message node create args structure: */
69struct rms_msg_args {
70	rms_word max_msgs;	/* Max # simultaneous msgs to node */
71	rms_word segid;		/* Mem segment for NODE_allocMsgBuf */
72	rms_word notify_type;	/* Type of message notification */
73	rms_word arg_length;	/* Length (in DSP chars) of arg data */
74	rms_word arg_data;	/* Arg data for node */
75};
76
77/* Partial task create args structure */
78struct rms_more_task_args {
79	rms_word priority;	/* Task's runtime priority level */
80	rms_word stack_size;	/* Task's stack size */
81	rms_word sysstack_size;	/* Task's system stack size (55x) */
82	rms_word stack_seg;	/* Memory segment for task's stack */
83	rms_word heap_addr;	/* base address of the node memory heap in
84				 * external memory (DSP virtual address) */
85	rms_word heap_size;	/* size in MAUs of the node memory heap in
86				 * external memory */
87	rms_word misc;		/* Misc field.  Not used for 'normal'
88				 * task nodes; for xDAIS socket nodes
89				 * specifies the IALG_Fxn pointer.
90				 */
91	/* # input STRM definition structures */
92	rms_word num_input_streams;
93};
94
95#endif /* RMS_SH_ */
96