Bryan O'Donoghue | 4b57610 | 2018-07-11 16:35:17 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 6 | |
Bryan O'Donoghue | 4b57610 | 2018-07-11 16:35:17 +0100 | [diff] [blame] | 7 | #include <stdint.h> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 8 | |
| 9 | #include <lib/mmio.h> |
| 10 | |
Bryan O'Donoghue | 4b57610 | 2018-07-11 16:35:17 +0100 | [diff] [blame] | 11 | #include <imx_caam.h> |
| 12 | |
| 13 | void imx_caam_init(void) |
| 14 | { |
| 15 | struct caam_ctrl *caam = (struct caam_ctrl *)CAAM_AIPS_BASE; |
| 16 | uint32_t reg; |
| 17 | int i; |
| 18 | |
| 19 | for (i = 0; i < CAAM_NUM_JOB_RINGS; i++) { |
| 20 | reg = mmio_read_32((uintptr_t)&caam->jr[i].jrmidr_ms); |
| 21 | reg |= JROWN_NS | JROWN_MID; |
| 22 | mmio_write_32((uintptr_t)&caam->jr[i].jrmidr_ms, reg); |
| 23 | } |
| 24 | } |