1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <device/mmio.h>
4 #include <soc/trustzone.h>
6 /* Setting TZPC[TrustZone Protection Controller] */
7 void trustzone_init(void)
9 struct exynos_tzpc
*tzpc
;
12 for (addr
= TZPC0_BASE
; addr
<= TZPC9_BASE
; addr
+= TZPC_BASE_OFFSET
) {
13 tzpc
= (struct exynos_tzpc
*)addr
;
15 if (addr
== TZPC0_BASE
)
16 write32(&tzpc
->r0size
, R0SIZE
);
18 write32(&tzpc
->decprot0set
, DECPROTXSET
);
19 write32(&tzpc
->decprot1set
, DECPROTXSET
);
21 if (addr
!= TZPC9_BASE
) {
22 write32(&tzpc
->decprot2set
, DECPROTXSET
);
23 write32(&tzpc
->decprot3set
, DECPROTXSET
);