blob: 296dce8536a76b78a2d2c162242b2ff1571969f1 [file] [log] [blame]
Grzegorz Jaszczyk986901c2018-06-13 15:27:10 +02001/*
2 * Copyright (C) 2018 Marvell International Ltd.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 * https://spdx.org/licenses
6 */
7
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00008#ifndef MC_TRUSTZONE_H
9#define MC_TRUSTZONE_H
Grzegorz Jaszczyk986901c2018-06-13 15:27:10 +020010
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000011#include <drivers/marvell/addr_map.h>
Grzegorz Jaszczyk986901c2018-06-13 15:27:10 +020012
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
25void tz_enable_win(int ap_index, const struct addr_map_win *win, int win_id);
26
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000027#endif /* MC_TRUSTZONE_H */