blob: 95c55cd4d1307d99c4c09f17e94de4429d2a3355 [file] [log] [blame]
Chen-Yu Tsaifcc7b702015-08-25 10:49:19 +08001/*
2 * (C) Copyright 2015 Chen-Yu Tsai <wens@csie.org>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#ifndef _SUNXI_TZPC_H
8#define _SUNXI_TZPC_H
9
10#ifndef __ASSEMBLY__
11struct sunxi_tzpc {
12 u32 r0size; /* 0x00 Size of secure RAM region */
13 u32 decport0_status; /* 0x04 Status of decode protection port 0 */
14 u32 decport0_set; /* 0x08 Set decode protection port 0 */
15 u32 decport0_clear; /* 0x0c Clear decode protection port 0 */
Chen-Yu Tsai0932b632016-01-06 15:13:06 +080016 /* For A80 and later SoCs */
17 u32 decport1_status; /* 0x10 Status of decode protection port 1 */
18 u32 decport1_set; /* 0x14 Set decode protection port 1 */
19 u32 decport1_clear; /* 0x18 Clear decode protection port 1 */
20 u32 decport2_status; /* 0x1c Status of decode protection port 2 */
21 u32 decport2_set; /* 0x20 Set decode protection port 2 */
22 u32 decport2_clear; /* 0x24 Clear decode protection port 2 */
Chen-Yu Tsaifcc7b702015-08-25 10:49:19 +080023};
24#endif
25
Chen-Yu Tsai0932b632016-01-06 15:13:06 +080026#define SUN6I_TZPC_DECPORT0_RTC (1 << 1)
27
28#define SUN8I_H3_TZPC_DECPORT0_ALL 0xbe
29#define SUN8I_H3_TZPC_DECPORT1_ALL 0xff
30#define SUN8I_H3_TZPC_DECPORT2_ALL 0x7f
Chen-Yu Tsaifcc7b702015-08-25 10:49:19 +080031
32void tzpc_init(void);
33
34#endif /* _SUNXI_TZPC_H */