blob: a4b92b86cc6c886bf529a834ce58166b5f151321 [file] [log] [blame]
Peng Fan0c830d32018-10-18 14:28:07 +02001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright 2018 NXP
4 */
5
6#ifndef SC_MISC_API_H
7#define SC_MISC_API_H
Peng Fane89a3912023-06-15 18:09:04 +08008/* Defines for type widths */
9#define SC_MISC_DMA_GRP_W 5U /* Width of sc_misc_dma_group_t */
Peng Fan0c830d32018-10-18 14:28:07 +020010
Peng Fane89a3912023-06-15 18:09:04 +080011/* Max DMA channel priority group */
12#define SC_MISC_DMA_GRP_MAX 31U
Peng Fan0c830d32018-10-18 14:28:07 +020013/* Defines for sc_misc_boot_status_t */
14#define SC_MISC_BOOT_STATUS_SUCCESS 0U /* Success */
15#define SC_MISC_BOOT_STATUS_SECURITY 1U /* Security violation */
16
Peng Fan0c830d32018-10-18 14:28:07 +020017/* Defines for sc_misc_temp_t */
Peng Fane89a3912023-06-15 18:09:04 +080018#define SC_MISC_TEMP 0U /* Temp sensor */
19#define SC_MISC_TEMP_HIGH 1U /* Temp high alarm */
20#define SC_MISC_TEMP_LOW 2U /* Temp low alarm */
Peng Fan0c830d32018-10-18 14:28:07 +020021
Peng Fane89a3912023-06-15 18:09:04 +080022/* Defines for sc_misc_bt_t */
23#define SC_MISC_BT_PRIMARY 0U /* Primary boot */
24#define SC_MISC_BT_SECONDARY 1U /* Secondary boot */
25#define SC_MISC_BT_RECOVERY 2U /* Recovery boot */
26#define SC_MISC_BT_MANUFACTURE 3U /* Manufacture boot */
27#define SC_MISC_BT_SERIAL 4U /* Serial boot */
28/* Types */
Peng Fan0c830d32018-10-18 14:28:07 +020029
Peng Fane89a3912023-06-15 18:09:04 +080030/*
31 * This type is used to store a DMA channel priority group.
32 */
33typedef u8 sc_misc_dma_group_t;
34
35/*
36 * This type is used report boot status.
37 */
Peng Fan0c830d32018-10-18 14:28:07 +020038typedef u8 sc_misc_boot_status_t;
Peng Fane89a3912023-06-15 18:09:04 +080039
40/*
41 * This type is used report boot status.
42 */
Peng Fanba44e012019-05-05 13:23:51 +000043typedef u8 sc_misc_temp_t;
Peng Fan0c830d32018-10-18 14:28:07 +020044
Peng Fane89a3912023-06-15 18:09:04 +080045/*
46 * This type is used report the boot type.
47 */
48typedef u8 sc_misc_bt_t;
Peng Fan0c830d32018-10-18 14:28:07 +020049#endif /* SC_MISC_API_H */