]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/arm/cpu/armv7/sunxi/tzpc.c
sunxi: Enable non-secure access to RTC on sun6i (A31s)
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / sunxi / tzpc.c
1 /*
2  * (C) Copyright 2015 Chen-Yu Tsai <wens@csie.org>
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7 #include <asm/io.h>
8 #include <asm/arch/cpu.h>
9 #include <asm/arch/tzpc.h>
10
11 /* Configure Trust Zone Protection Controller */
12 void tzpc_init(void)
13 {
14         struct sunxi_tzpc *tzpc = (struct sunxi_tzpc *)SUNXI_TZPC_BASE;
15
16         /* Enable non-secure access to the RTC */
17         writel(SUNXI_TZPC_DECPORT0_RTC, &tzpc->decport0_set);
18 }