diff options
author | Dong Aisheng <aisheng.dong@nxp.com> | 2018-10-07 09:04:43 -0400 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2018-10-08 10:09:09 -0400 |
commit | 15e1f2bc8b3b2d238b9e06b128d4a09d28f11733 (patch) | |
tree | 3538b7884dcc6889f1618fae7ede9c99926cedc8 /include/linux/firmware/imx/svc | |
parent | edbee095fafb4b727b51032bdc41e345f95bbc20 (diff) |
firmware: imx: add misc svc support
Add SCU MISC SVC support which provides misc control get/set functions.
Cc: Shawn Guo <shawnguo@kernel.org>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'include/linux/firmware/imx/svc')
-rw-r--r-- | include/linux/firmware/imx/svc/misc.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/include/linux/firmware/imx/svc/misc.h b/include/linux/firmware/imx/svc/misc.h new file mode 100644 index 000000000000..e21c49aba92f --- /dev/null +++ b/include/linux/firmware/imx/svc/misc.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0+ */ | ||
2 | /* | ||
3 | * Copyright (C) 2016 Freescale Semiconductor, Inc. | ||
4 | * Copyright 2017~2018 NXP | ||
5 | * | ||
6 | * Header file containing the public API for the System Controller (SC) | ||
7 | * Miscellaneous (MISC) function. | ||
8 | * | ||
9 | * MISC_SVC (SVC) Miscellaneous Service | ||
10 | * | ||
11 | * Module for the Miscellaneous (MISC) service. | ||
12 | */ | ||
13 | |||
14 | #ifndef _SC_MISC_API_H | ||
15 | #define _SC_MISC_API_H | ||
16 | |||
17 | #include <linux/firmware/imx/sci.h> | ||
18 | |||
19 | /* | ||
20 | * This type is used to indicate RPC MISC function calls. | ||
21 | */ | ||
22 | enum imx_misc_func { | ||
23 | IMX_SC_MISC_FUNC_UNKNOWN = 0, | ||
24 | IMX_SC_MISC_FUNC_SET_CONTROL = 1, | ||
25 | IMX_SC_MISC_FUNC_GET_CONTROL = 2, | ||
26 | IMX_SC_MISC_FUNC_SET_MAX_DMA_GROUP = 4, | ||
27 | IMX_SC_MISC_FUNC_SET_DMA_GROUP = 5, | ||
28 | IMX_SC_MISC_FUNC_SECO_IMAGE_LOAD = 8, | ||
29 | IMX_SC_MISC_FUNC_SECO_AUTHENTICATE = 9, | ||
30 | IMX_SC_MISC_FUNC_DEBUG_OUT = 10, | ||
31 | IMX_SC_MISC_FUNC_WAVEFORM_CAPTURE = 6, | ||
32 | IMX_SC_MISC_FUNC_BUILD_INFO = 15, | ||
33 | IMX_SC_MISC_FUNC_UNIQUE_ID = 19, | ||
34 | IMX_SC_MISC_FUNC_SET_ARI = 3, | ||
35 | IMX_SC_MISC_FUNC_BOOT_STATUS = 7, | ||
36 | IMX_SC_MISC_FUNC_BOOT_DONE = 14, | ||
37 | IMX_SC_MISC_FUNC_OTP_FUSE_READ = 11, | ||
38 | IMX_SC_MISC_FUNC_OTP_FUSE_WRITE = 17, | ||
39 | IMX_SC_MISC_FUNC_SET_TEMP = 12, | ||
40 | IMX_SC_MISC_FUNC_GET_TEMP = 13, | ||
41 | IMX_SC_MISC_FUNC_GET_BOOT_DEV = 16, | ||
42 | IMX_SC_MISC_FUNC_GET_BUTTON_STATUS = 18, | ||
43 | }; | ||
44 | |||
45 | /* | ||
46 | * Control Functions | ||
47 | */ | ||
48 | |||
49 | int imx_sc_misc_set_control(struct imx_sc_ipc *ipc, u32 resource, | ||
50 | u8 ctrl, u32 val); | ||
51 | |||
52 | int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource, | ||
53 | u8 ctrl, u32 *val); | ||
54 | |||
55 | #endif /* _SC_MISC_API_H */ | ||