Grzegorz Jaszczyk | 986901c | 2018-06-13 15:27:10 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 Marvell International Ltd. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * https://spdx.org/licenses |
| 6 | */ |
| 7 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 8 | #ifndef MC_TRUSTZONE_H |
| 9 | #define MC_TRUSTZONE_H |
Grzegorz Jaszczyk | 986901c | 2018-06-13 15:27:10 +0200 | [diff] [blame] | 10 | |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 11 | #include <drivers/marvell/addr_map.h> |
Grzegorz Jaszczyk | 986901c | 2018-06-13 15:27:10 +0200 | [diff] [blame] | 12 | |
| 13 | #define MVEBU_TZ_MAX_WINS 16 |
| 14 | |
| 15 | #define TZ_VALID (1 << 0) |
| 16 | #define TZ_PERM(x) ((x) << 1) |
| 17 | #define TZ_RZ_ENABLE (1 << 3) |
| 18 | |
| 19 | /* tz attr definitions */ |
| 20 | #define TZ_PERM_RW (TZ_PERM(0)) |
| 21 | #define TZ_PERM_RO (TZ_PERM(1)) |
| 22 | #define TZ_PERM_WO (TZ_PERM(2)) |
| 23 | #define TZ_PERM_ABORT (TZ_PERM(3)) |
| 24 | |
| 25 | void tz_enable_win(int ap_index, const struct addr_map_win *win, int win_id); |
| 26 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 27 | #endif /* MC_TRUSTZONE_H */ |