~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/arm/plat-omap/include/syslink/heapbufmp_ioctl.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *  heapbufmp_ioctl.h
3
 
 *
4
 
 *  Heap module manages fixed size buffers that can be used
5
 
 *  in a multiprocessor system with shared memory.
6
 
 *
7
 
 *  Copyright (C) 2008-2009 Texas Instruments, Inc.
8
 
 *
9
 
 *  This package is free software; you can redistribute it and/or modify
10
 
 *  it under the terms of the GNU General Public License version 2 as
11
 
 *  published by the Free Software Foundation.
12
 
 *
13
 
 *  THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14
 
 *  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15
 
 *  WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
16
 
 *  PURPOSE.
17
 
 */
18
 
 
19
 
#ifndef _HEAPBUFMP_IOCTL_
20
 
#define _HEAPBUFMP_IOCTL_
21
 
 
22
 
#include <linux/ioctl.h>
23
 
#include <linux/types.h>
24
 
 
25
 
#include <ipc_ioctl.h>
26
 
#include <heapbufmp.h>
27
 
 
28
 
 
29
 
enum CMD_HEAPBUF {
30
 
        HEAPBUFMP_GETCONFIG = HEAPBUFMP_BASE_CMD,
31
 
        HEAPBUFMP_SETUP,
32
 
        HEAPBUFMP_DESTROY,
33
 
        HEAPBUFMP_PARAMS_INIT,
34
 
        HEAPBUFMP_CREATE,
35
 
        HEAPBUFMP_DELETE,
36
 
        HEAPBUFMP_OPEN,
37
 
        HEAPBUFMP_OPENBYADDR,
38
 
        HEAPBUFMP_CLOSE,
39
 
        HEAPBUFMP_ALLOC,
40
 
        HEAPBUFMP_FREE,
41
 
        HEAPBUFMP_SHAREDMEMREQ,
42
 
        HEAPBUFMP_GETSTATS,
43
 
        HEAPBUFMP_GETEXTENDEDSTATS
44
 
};
45
 
 
46
 
/*
47
 
 *  Command for heapbufmp_get_config
48
 
 */
49
 
#define CMD_HEAPBUFMP_GETCONFIG         _IOWR(IPC_IOC_MAGIC, \
50
 
                                        HEAPBUFMP_GETCONFIG, \
51
 
                                        struct heapbufmp_cmd_args)
52
 
 
53
 
/*
54
 
 *  Command for heapbufmp_setup
55
 
 */
56
 
#define CMD_HEAPBUFMP_SETUP             _IOWR(IPC_IOC_MAGIC, \
57
 
                                        HEAPBUFMP_SETUP, \
58
 
                                        struct heapbufmp_cmd_args)
59
 
/*
60
 
 *  Command for heapbufmp_destroy
61
 
 */
62
 
#define CMD_HEAPBUFMP_DESTROY           _IOWR(IPC_IOC_MAGIC, \
63
 
                                        HEAPBUFMP_DESTROY, \
64
 
                                        struct heapbufmp_cmd_args)
65
 
 
66
 
/*
67
 
 *  Command for heapbufmp_prams_init
68
 
 */
69
 
#define CMD_HEAPBUFMP_PARAMS_INIT       _IOWR(IPC_IOC_MAGIC, \
70
 
                                        HEAPBUFMP_PARAMS_INIT, \
71
 
                                        struct heapbufmp_cmd_args)
72
 
 
73
 
/*
74
 
 *  Command for heapbufmp_create
75
 
 */
76
 
#define CMD_HEAPBUFMP_CREATE            _IOWR(IPC_IOC_MAGIC, \
77
 
                                        HEAPBUFMP_CREATE, \
78
 
                                        struct heapbufmp_cmd_args)
79
 
 
80
 
/*
81
 
 *  Command for heapbufmp_delete
82
 
 */
83
 
#define CMD_HEAPBUFMP_DELETE            _IOWR(IPC_IOC_MAGIC, \
84
 
                                        HEAPBUFMP_DELETE, \
85
 
                                        struct heapbufmp_cmd_args)
86
 
 
87
 
/*
88
 
 *  Command for heapbufmp_open
89
 
 */
90
 
#define CMD_HEAPBUFMP_OPEN              _IOWR(IPC_IOC_MAGIC, \
91
 
                                        HEAPBUFMP_OPEN, \
92
 
                                        struct heapbufmp_cmd_args)
93
 
 
94
 
/*
95
 
 *  Command for heapbufmp_open_by_addr
96
 
 */
97
 
#define CMD_HEAPBUFMP_OPENBYADDR        _IOWR(IPC_IOC_MAGIC, \
98
 
                                        HEAPBUFMP_OPENBYADDR, \
99
 
                                        struct heapbufmp_cmd_args)
100
 
 
101
 
/*
102
 
 *  Command for heapbufmp_close
103
 
 */
104
 
#define CMD_HEAPBUFMP_CLOSE             _IOWR(IPC_IOC_MAGIC, \
105
 
                                        HEAPBUFMP_CLOSE, \
106
 
                                        struct heapbufmp_cmd_args)
107
 
 
108
 
/*
109
 
 *  Command for heapbufmp_alloc
110
 
 */
111
 
#define CMD_HEAPBUFMP_ALLOC             _IOWR(IPC_IOC_MAGIC, \
112
 
                                        HEAPBUFMP_ALLOC, \
113
 
                                        struct heapbufmp_cmd_args)
114
 
 
115
 
/*
116
 
 *  Command for heapbufmp_free
117
 
 */
118
 
#define CMD_HEAPBUFMP_FREE              _IOWR(IPC_IOC_MAGIC, \
119
 
                                        HEAPBUFMP_FREE, \
120
 
                                        struct heapbufmp_cmd_args)
121
 
 
122
 
/*
123
 
 *  Command for heapbufmp_shared_mem_req
124
 
 */
125
 
#define CMD_HEAPBUFMP_SHAREDMEMREQ      _IOWR(IPC_IOC_MAGIC, \
126
 
                                        HEAPBUFMP_SHAREDMEMREQ, \
127
 
                                        struct heapbufmp_cmd_args)
128
 
 
129
 
/*
130
 
 *  Command for heapbufmp_get_stats
131
 
 */
132
 
#define CMD_HEAPBUFMP_GETSTATS          _IOWR(IPC_IOC_MAGIC, \
133
 
                                        HEAPBUFMP_GETSTATS, \
134
 
                                        struct heapbufmp_cmd_args)
135
 
 
136
 
/*
137
 
 *  Command for heapbufmp_get_extended_stats
138
 
 */
139
 
#define CMD_HEAPBUFMP_GETEXTENDEDSTATS  _IOWR(IPC_IOC_MAGIC, \
140
 
                                        HEAPBUFMP_GETEXTENDEDSTATS, \
141
 
                                        struct heapbufmp_cmd_args)
142
 
 
143
 
 
144
 
/*
145
 
 *  Command arguments for heapbuf
146
 
 */
147
 
union heapbufmp_arg {
148
 
        struct {
149
 
                struct heapbufmp_params *params;
150
 
        } params_init;
151
 
 
152
 
        struct  {
153
 
                struct heapbufmp_config *config;
154
 
        } get_config;
155
 
 
156
 
        struct {
157
 
                struct heapbufmp_config *config;
158
 
        } setup;
159
 
 
160
 
        struct {
161
 
                void *handle;
162
 
                struct heapbufmp_params *params;
163
 
                u32 name_len;
164
 
                u32 *shared_addr_srptr;
165
 
                void *knl_gate;
166
 
        } create;
167
 
 
168
 
        struct {
169
 
                void *handle;
170
 
        } delete;
171
 
 
172
 
        struct {
173
 
                void *handle;
174
 
                char *name;
175
 
                u32 name_len;
176
 
        } open;
177
 
 
178
 
        struct {
179
 
                void *handle;
180
 
                u32 *shared_addr_srptr;
181
 
        } open_by_addr;
182
 
 
183
 
        struct {
184
 
                void *handle;
185
 
        } close;
186
 
 
187
 
        struct {
188
 
                void *handle;
189
 
                u32 size;
190
 
                u32 align;
191
 
                u32 *block_srptr;
192
 
        } alloc;
193
 
 
194
 
        struct {
195
 
                void *handle;
196
 
                u32 *block_srptr;
197
 
                u32 size;
198
 
        } free;
199
 
 
200
 
        struct {
201
 
                void *handle;
202
 
                struct memory_stats *stats;
203
 
        } get_stats;
204
 
 
205
 
        struct {
206
 
                void *handle;
207
 
                struct heapbufmp_extended_stats *stats;
208
 
        } get_extended_stats;
209
 
 
210
 
        struct {
211
 
                void *handle;
212
 
                struct heapbufmp_params *params;
213
 
                u32 *shared_addr_srptr;
214
 
                u32 bytes;
215
 
        } shared_mem_req;
216
 
};
217
 
 
218
 
/*
219
 
 *  Command arguments for heapbuf
220
 
 */
221
 
struct heapbufmp_cmd_args{
222
 
        union heapbufmp_arg args;
223
 
        s32 api_status;
224
 
};
225
 
 
226
 
/*
227
 
 *  This ioctl interface for heapbuf module
228
 
 */
229
 
int heapbufmp_ioctl(struct inode *pinode, struct file *filp,
230
 
                        unsigned int cmd, unsigned long  args, bool user);
231
 
 
232
 
#endif /* _HEAPBUFMP_IOCTL_ */