imx_caam.c 500 Bytes
Newer Older
1
2
3
4
5
/*
 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */
6

7
#include <stdint.h>
8
9
10

#include <lib/mmio.h>

11
12
13
14
15
16
17
18
19
20
21
22
23
24
#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);
	}
}