summaryrefslogtreecommitdiff
path: root/arch/arm/plat-omap/include/syslink/sysmgr_ioctl.h
blob: 03db7b9511a260d74d56df82168f7b18d2077c28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*
 *  sysmgr_ioctl.h
 *
 *  Definitions of sysmgr driver types and structures..
 *
 *  Copyright (C) 2008-2009 Texas Instruments, Inc.
 *
 *  This package is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License version 2 as
 *  published by the Free Software Foundation.
 *
 *  THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 *  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 *  WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
 *  PURPOSE.
 */

#ifndef _SYSMGR_IOCTL_H_
#define _SYSMGR_IOCTL_H_

/* Standard headers */
#include <linux/types.h>

/* Syslink headers */
#include <ipc_ioctl.h>
#include <sysmgr.h>


/* =============================================================================
 *  Macros and types
 * =============================================================================
 */
/*  ----------------------------------------------------------------------------
 *  IOCTL command IDs for sysmgr
 *  ----------------------------------------------------------------------------
 */
/* IOC Magic Number for sysmgr */
#define SYSMGR_IOC_MAGIC		IPC_IOC_MAGIC

/* IOCTL command numbers for sysmgr */
enum sysmgr_drv_cmd {
	SYSMGR_SETUP = SYSMGR_BASE_CMD,
	SYSMGR_DESTROY,
	SYSMGR_LOADCALLBACK,
	SYSMGR_STARTCALLBACK,
	SYSMGR_STOPCALLBACK
};

/* Command for sysmgr_setup */
#define CMD_SYSMGR_SETUP \
			_IOWR(SYSMGR_IOC_MAGIC, SYSMGR_SETUP, \
			struct sysmgr_cmd_args)

/* Command for sysmgr_destroy */
#define CMD_SYSMGR_DESTROY \
			_IOWR(SYSMGR_IOC_MAGIC, SYSMGR_DESTROY, \
			struct sysmgr_cmd_args)

/* Command for load callback */
#define CMD_SYSMGR_LOADCALLBACK \
			_IOWR(SYSMGR_IOC_MAGIC, SYSMGR_LOADCALLBACK, \
			struct sysmgr_cmd_args)

/* Command for load callback */
#define CMD_SYSMGR_STARTCALLBACK \
			_IOWR(SYSMGR_IOC_MAGIC, SYSMGR_STARTCALLBACK, \
			struct sysmgr_cmd_args)

/* Command for stop callback */
#define CMD_SYSMGR_STOPCALLBACK \
			_IOWR(SYSMGR_IOC_MAGIC, SYSMGR_STOPCALLBACK, \
			struct sysmgr_cmd_args)


/*  ----------------------------------------------------------------------------
 *  Command arguments for sysmgr
 *  ----------------------------------------------------------------------------
 */
/* Command arguments for sysmgr */
struct sysmgr_cmd_args {
	union {
		struct {
			struct sysmgr_config *config;
		} setup;

		int proc_id;
	} args;

	s32 api_status;
};

/*  ----------------------------------------------------------------------------
 *  IOCTL functions for sysmgr module
 *  ----------------------------------------------------------------------------
 */
/* ioctl interface function for sysmgr */
int sysmgr_ioctl(struct inode *inode, struct file *filp,
				unsigned int cmd, unsigned long args);

#endif /* _SYSMGR_IOCTL_H_ */