mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-08-15 08:57:02 +02:00
All identifiers, regardless of use, that start with two underscores are reserved. This means they can't be used in header guards. The style that this project is now to use the full name of the file in capital letters followed by 'H'. For example, for a file called "uart_example.h", the header guard is UART_EXAMPLE_H. The exceptions are files that are imported from other projects: - CryptoCell driver - dt-bindings folders - zlib headers Change-Id: I50561bf6c88b491ec440d0c8385c74650f3c106e Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
70 lines
1.4 KiB
C
70 lines
1.4 KiB
C
/*
|
|
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef IMX_CAAM_H
|
|
#define IMX_CAAM_H
|
|
|
|
#include <stdint.h>
|
|
#include <arch.h>
|
|
#include <imx_regs.h>
|
|
|
|
struct caam_job_ring {
|
|
uint32_t jrmidr_ms;
|
|
uint32_t jrmidr_ls;
|
|
};
|
|
|
|
struct caam_rtic_mid {
|
|
uint32_t rticmidr_ms;
|
|
uint32_t rticmidr_ls;
|
|
};
|
|
|
|
struct caam_deco {
|
|
uint32_t deco_mid_ms;
|
|
uint32_t deco_mid_ls;
|
|
};
|
|
|
|
#define JOB_RING_OFFSET 0x10
|
|
#define DEBUGCTL_OFFSET 0x58
|
|
#define RES2_SIZE (DEBUGCTL_OFFSET - JOB_RING_OFFSET - \
|
|
(sizeof(struct caam_job_ring) * CAAM_NUM_JOB_RINGS))
|
|
|
|
#define RTIC_MID_OFFSET 0x60
|
|
#define DECORR_OFFSET 0x9C
|
|
#define RES3_SIZE (DECORR_OFFSET - RTIC_MID_OFFSET - \
|
|
(sizeof(struct caam_rtic_mid) * CAAM_NUM_RTIC))
|
|
|
|
#define DECO_MID_OFFSET 0xA0
|
|
#define DAR_OFFSET 0x120
|
|
#define RES4_SIZE (DAR_OFFSET - DECO_MID_OFFSET - \
|
|
(sizeof(struct caam_deco) * CAAM_NUM_DECO))
|
|
|
|
struct caam_ctrl {
|
|
uint32_t res0;
|
|
uint32_t mcfgr;
|
|
uint32_t res1;
|
|
uint32_t scfgr;
|
|
struct caam_job_ring jr[CAAM_NUM_JOB_RINGS];
|
|
uint8_t res2[RES2_SIZE];
|
|
uint32_t debuctl;
|
|
uint32_t jrstartr;
|
|
struct caam_rtic_mid mid[CAAM_NUM_RTIC];
|
|
uint8_t res3[RES3_SIZE];
|
|
uint32_t decorr;
|
|
struct caam_deco deco[CAAM_NUM_DECO];
|
|
uint8_t res4[RES4_SIZE];
|
|
uint32_t dar;
|
|
uint32_t drr;
|
|
} __packed;
|
|
|
|
/* Job ring control bits */
|
|
#define JROWN_NS BIT(3)
|
|
#define JROWN_MID 0x01
|
|
|
|
/* Declare CAAM API */
|
|
void imx_caam_init(void);
|
|
|
|
#endif /* IMX_CAAM_H */
|