diff options
Diffstat (limited to 'plat/imx/common/imx_caam.c')
-rw-r--r-- | plat/imx/common/imx_caam.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/plat/imx/common/imx_caam.c b/plat/imx/common/imx_caam.c new file mode 100644 index 0000000..d9c141f --- /dev/null +++ b/plat/imx/common/imx_caam.c @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include <stdint.h> + +#include <lib/mmio.h> + +#include <imx_caam.h> + +void imx_caam_init(void) +{ + struct caam_ctrl *caam = (struct caam_ctrl *)CAAM_AIPS_BASE; + uint32_t reg; + int i; + + for (i = 0; i < CAAM_NUM_JOB_RINGS; i++) { + reg = mmio_read_32((uintptr_t)&caam->jr[i].jrmidr_ms); + reg |= JROWN_NS | JROWN_MID; + mmio_write_32((uintptr_t)&caam->jr[i].jrmidr_ms, reg); + } +} |