Peng Fan | 0c830d3 | 2018-10-18 14:28:07 +0200 | [diff] [blame] | 1 | /* 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 Fan | e89a391 | 2023-06-15 18:09:04 +0800 | [diff] [blame] | 8 | /* Defines for type widths */ |
| 9 | #define SC_MISC_DMA_GRP_W 5U /* Width of sc_misc_dma_group_t */ |
Peng Fan | 0c830d3 | 2018-10-18 14:28:07 +0200 | [diff] [blame] | 10 | |
Peng Fan | e89a391 | 2023-06-15 18:09:04 +0800 | [diff] [blame] | 11 | /* Max DMA channel priority group */ |
| 12 | #define SC_MISC_DMA_GRP_MAX 31U |
Peng Fan | 0c830d3 | 2018-10-18 14:28:07 +0200 | [diff] [blame] | 13 | /* 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 Fan | 0c830d3 | 2018-10-18 14:28:07 +0200 | [diff] [blame] | 17 | /* Defines for sc_misc_temp_t */ |
Peng Fan | e89a391 | 2023-06-15 18:09:04 +0800 | [diff] [blame] | 18 | #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 Fan | 0c830d3 | 2018-10-18 14:28:07 +0200 | [diff] [blame] | 21 | |
Peng Fan | e89a391 | 2023-06-15 18:09:04 +0800 | [diff] [blame] | 22 | /* 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 Fan | 0c830d3 | 2018-10-18 14:28:07 +0200 | [diff] [blame] | 29 | |
Peng Fan | e89a391 | 2023-06-15 18:09:04 +0800 | [diff] [blame] | 30 | /* |
| 31 | * This type is used to store a DMA channel priority group. |
| 32 | */ |
| 33 | typedef u8 sc_misc_dma_group_t; |
| 34 | |
| 35 | /* |
| 36 | * This type is used report boot status. |
| 37 | */ |
Peng Fan | 0c830d3 | 2018-10-18 14:28:07 +0200 | [diff] [blame] | 38 | typedef u8 sc_misc_boot_status_t; |
Peng Fan | e89a391 | 2023-06-15 18:09:04 +0800 | [diff] [blame] | 39 | |
| 40 | /* |
| 41 | * This type is used report boot status. |
| 42 | */ |
Peng Fan | ba44e01 | 2019-05-05 13:23:51 +0000 | [diff] [blame] | 43 | typedef u8 sc_misc_temp_t; |
Peng Fan | 0c830d3 | 2018-10-18 14:28:07 +0200 | [diff] [blame] | 44 | |
Peng Fan | e89a391 | 2023-06-15 18:09:04 +0800 | [diff] [blame] | 45 | /* |
| 46 | * This type is used report the boot type. |
| 47 | */ |
| 48 | typedef u8 sc_misc_bt_t; |
Peng Fan | 0c830d3 | 2018-10-18 14:28:07 +0200 | [diff] [blame] | 49 | #endif /* SC_MISC_API_H */ |