1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright 2018-2019, 2021 NXP 4 * 5 * CAAM driver common include file. 6 */ 7 8 #ifndef __CAAM_COMMON_H__ 9 #define __CAAM_COMMON_H__ 10 11 #include <caam_desc_helper.h> 12 #include <caam_status.h> 13 #include <caam_trace.h> 14 #include <caam_types.h> 15 16 /* 17 * Definition of the number of CAAM Jobs to manage in JR queues 18 */ 19 #if defined(CFG_NB_JOBS_QUEUE) 20 #define NB_JOBS_QUEUE CFG_NB_JOBS_QUEUE 21 #else 22 #define NB_JOBS_QUEUE 10 23 #endif 24 25 /* 26 * Flag Job Ring Owner is Secure 27 */ 28 #define JROWNER_SECURE 0x10 29 30 /* 31 * Job Ring Owner. Enumerate Id (expect the Secure Flag) correspond 32 * to the HW ID. 33 */ 34 #if defined(CFG_MX7ULP) 35 enum caam_jr_owner { 36 JROWN_ARM_NS = 0x4, /* Non-Secure ARM */ 37 JROWN_ARM_S = JROWNER_SECURE | 0x4, /* Secure ARM */ 38 }; 39 #elif defined(CFG_MX8ULP) 40 enum caam_jr_owner { 41 JROWN_ARM_NS = 0x7, /* Non-Secure ARM */ 42 JROWN_ARM_S = JROWNER_SECURE | 0x7, /* Secure ARM */ 43 }; 44 #else 45 enum caam_jr_owner { 46 JROWN_ARM_NS = 0x1, /* Non-Secure ARM */ 47 JROWN_ARM_S = JROWNER_SECURE | 0x1, /* Secure ARM */ 48 }; 49 #endif 50 51 #endif /* __CAAM_COMMON_H__ */ 52