keystone_remoteproc.h
2.06 KB
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
/*
* Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation version 2.
*
* This program is distributed "as is" WITHOUT ANY WARRANTY of any
* kind, whether express or implied; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef _UAPI_LINUX_KEYSTONE_REMOTEPROC_H_
#define _UAPI_LINUX_KEYSTONE_REMOTEPROC_H_
#include <linux/types.h>
#include <linux/ioctl.h>
/**
* enum keystone_rproc_state - keystone remoteproc state setting values
*
* @KEYSTONE_RPROC_OFFLINE: request to configure the remoteproc into an offline
* state
* @KEYSTONE_RPROC_RUNNING: request to configure the remoteproc into a ready
* state
*/
enum keystone_rproc_state {
KEYSTONE_RPROC_OFFLINE,
KEYSTONE_RPROC_RUNNING,
};
/**
* struct keystone_rproc_set_state_params - keystone remoteproc set state
* parameters structure
*
* @state: enumerated state value to set
* @boot_addr: boot address/entry point for the remote processor
*/
struct keystone_rproc_set_state_params {
enum keystone_rproc_state state;
uint32_t boot_addr;
};
/* Macros used within mmap function */
#define KEYSTONE_RPROC_UIO_MAP_INDEX_MASK (0x7)
#define KEYSTONE_RPROC_UIO_MAP_OFFSET_SHIFT (3)
/* IOCTL definitions */
#define KEYSTONE_RPROC_IOC_MAGIC 'I'
#define KEYSTONE_RPROC_IOC_SET_RSC_TABLE _IOW(KEYSTONE_RPROC_IOC_MAGIC, \
0, void *)
#define KEYSTONE_RPROC_IOC_SET_STATE _IOW(KEYSTONE_RPROC_IOC_MAGIC, \
1, \
struct keystone_rproc_set_state_params)
#define KEYSTONE_RPROC_IOC_SET_LOADED_RSC_TABLE _IOW(KEYSTONE_RPROC_IOC_MAGIC, \
2, uint32_t)
#define KEYSTONE_RPROC_IOC_DSP_RESET _IO(KEYSTONE_RPROC_IOC_MAGIC, 3)
#define KEYSTONE_RPROC_IOC_DSP_BOOT _IOW(KEYSTONE_RPROC_IOC_MAGIC, \
4, uint32_t)
#define KEYSTONE_RPROC_IOC_MAXNR (5)
#endif /* _UAPI_LINUX_KEYSTONE_REMOTEPROC_H_ */