summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/sunxi/tzpc.c
blob: 5c9c69b20bf89cee6c953525a1a0d0c798885e40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * (C) Copyright 2015 Chen-Yu Tsai <wens@csie.org>
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/tzpc.h>

/* Configure Trust Zone Protection Controller */
void tzpc_init(void)
{
	struct sunxi_tzpc *tzpc = (struct sunxi_tzpc *)SUNXI_TZPC_BASE;

	/* Enable non-secure access to the RTC */
	writel(SUNXI_TZPC_DECPORT0_RTC, &tzpc->decport0_set);
}