blob: 335e1ed8ec5fd96ef3157df65d2f6e1739aa503a [file] [log] [blame]
Bryan O'Donoghue4b576102018-07-11 16:35:17 +01001/*
2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6#include <stdint.h>
7#include <mmio.h>
8#include <imx_caam.h>
9
10void imx_caam_init(void)
11{
12 struct caam_ctrl *caam = (struct caam_ctrl *)CAAM_AIPS_BASE;
13 uint32_t reg;
14 int i;
15
16 for (i = 0; i < CAAM_NUM_JOB_RINGS; i++) {
17 reg = mmio_read_32((uintptr_t)&caam->jr[i].jrmidr_ms);
18 reg |= JROWN_NS | JROWN_MID;
19 mmio_write_32((uintptr_t)&caam->jr[i].jrmidr_ms, reg);
20 }
21}