Jacky Bai | 91c6d32 | 2019-05-21 20:24:52 +0800 | [diff] [blame] | 1 | /* |
Soby Mathew | d2d7f29 | 2019-06-20 13:56:04 +0100 | [diff] [blame] | 2 | * Copyright (c) 2019, Arm Limited and Contributors. All rights reserved. |
Jacky Bai | 91c6d32 | 2019-05-21 20:24:52 +0800 | [diff] [blame] | 3 | * |
Soby Mathew | d2d7f29 | 2019-06-20 13:56:04 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Jacky Bai | 91c6d32 | 2019-05-21 20:24:52 +0800 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <lib/mmio.h> |
| 8 | |
| 9 | #include <imx_aipstz.h> |
| 10 | |
| 11 | void imx_aipstz_init(const struct aipstz_cfg *aipstz_cfg) |
| 12 | { |
| 13 | const struct aipstz_cfg *aipstz = aipstz_cfg; |
| 14 | |
| 15 | while (aipstz->base != 0U) { |
| 16 | mmio_write_32(aipstz->base + AIPSTZ_MPR0, aipstz->mpr0); |
| 17 | mmio_write_32(aipstz->base + AIPSTZ_MPR1, aipstz->mpr1); |
| 18 | |
| 19 | for (int i = 0; i < AIPSTZ_OPACR_NUM; i++) |
| 20 | mmio_write_32(aipstz->base + OPACR_OFFSET(i), aipstz->opacr[i]); |
| 21 | |
| 22 | aipstz++; |
| 23 | } |
| 24 | } |