2 * Lowlevel setup for SMDK5250 board based on S5PC520
4 * Copyright (C) 2012 Samsung Electronics
6 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/arch/tzpc.h>
13 /* Setting TZPC[TrustZone Protection Controller] */
16 struct exynos_tzpc *tzpc;
17 unsigned int addr, start = 0, end = 0;
19 start = samsung_get_base_tzpc();
22 end = start + ((EXYNOS5_NR_TZPC_BANKS - 1) * TZPC_BASE_OFFSET);
23 else if (cpu_is_exynos4())
24 end = start + ((EXYNOS4_NR_TZPC_BANKS - 1) * TZPC_BASE_OFFSET);
26 for (addr = start; addr <= end; addr += TZPC_BASE_OFFSET) {
27 tzpc = (struct exynos_tzpc *)addr;
30 writel(R0SIZE, &tzpc->r0size);
32 writel(DECPROTXSET, &tzpc->decprot0set);
33 writel(DECPROTXSET, &tzpc->decprot1set);
35 if (cpu_is_exynos5() && (addr == end))
38 writel(DECPROTXSET, &tzpc->decprot2set);
39 writel(DECPROTXSET, &tzpc->decprot3set);