1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (C) 2019 Bryan O'Donoghue
4  * Copyright 2019 NXP
5  *
6  * Bryan O'Donoghue <bryan.odonoghue@linaro.org>
7  */
8 
9 #ifndef __IMX_CAAM_H__
10 #define __IMX_CAAM_H__
11 
12 #include <imx-regs.h>
13 #include <stdint.h>
14 
15 struct imx_caam_job_ring {
16 	uint32_t			jrmidr_ms;
17 	uint32_t			jrmidr_ls;
18 };
19 
20 #define CAAM_NUM_JOB_RINGS		4
21 
22 /* CAAM ownersip definition bits */
23 #define JROWN_NS			BIT(3)
24 #define JROWN_MID			0x01
25 
26 /* A basic sub-set of the CAAM */
27 struct imx_caam_ctrl {
28 	uint32_t			res0;
29 	uint32_t			mcfgr;
30 	uint32_t			res1;
31 	uint32_t			scfgr;
32 	struct imx_caam_job_ring	jr[CAAM_NUM_JOB_RINGS];
33 };
34 
35 #endif /* __IMX_CAAM_H__ */
36