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 | */ |
| 6 | #include <stdint.h> |
| 7 | #include <mmio.h> |
| 8 | #include <imx_caam.h> |
| 9 | |
| 10 | void 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 | } |