1 // Copyright (C) 2022 Beken Corporation 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #pragma once 16 17 #include <common/bk_err.h> 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 #define BK_ERR_MPC_DRIVER_NOT_INIT (BK_ERR_MPC_BASE - 1) /**< MPC driver not init */ 24 #define BK_ERR_MPC_BLOCK_INDEX_OUT_OF_RANGE (BK_ERR_MPC_BASE - 2) /**< MPC block index is out of range */ 25 #define BK_ERR_MPC_INVALID_LUT_PARAM (BK_ERR_MPC_BASE - 3) /**< MPC invalid lut parameter */ 26 27 typedef enum { 28 MPC_DEV_PSRAM = 0, /**< MPC device PSRAM */ 29 MPC_DEV_QSPI0, /**< MPC device QSPI0 */ 30 MPC_DEV_QSPI1, /**< MPC device QSPI1 */ 31 MPC_DEV_OTP, /**< MPC device OTP */ 32 MPC_DEV_FLASH, /**< MPC device FLASH */ 33 MPC_DEV_SMEM0, /**< MPC device SMEM0 */ 34 MPC_DEV_SMEM1, /**< MPC device SMEM1 */ 35 MPC_DEV_SMEM2, /**< MPC device SMEM2 */ 36 MPC_DEV_SMEM3, /**< MPC device SMEM3 */ 37 MPC_DEV_SMEM4, /**< MPC device SMEM4 */ 38 MPC_DEV_MAX, /**< MPC max device id */ 39 } mpc_dev_t; 40 41 typedef enum { 42 MPC_BLOCK_SECURE = 0, /**< MPC attribute secure */ 43 MPC_BLOCK_NON_SECURE, /**< MPC attribute non secure */ 44 } mpc_block_secure_type_t; 45 46 #ifdef __cplusplus 47 } 48 #endif 49 50