summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/arch-sunxi
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2015-08-25 10:49:19 +0800
committerHans de Goede <hdegoede@redhat.com>2015-08-31 08:43:42 +0200
commit92369844ec7bf0e63de51e19b281fe3739e01397 (patch)
treeadd7a1f64102a55f53b06877c2fb9f547e045bc6 /arch/arm/include/asm/arch-sunxi
parent3537a0e8caa33ad4af354d5efc6be117b0728856 (diff)
downloadtalos-obmc-uboot-92369844ec7bf0e63de51e19b281fe3739e01397.tar.gz
talos-obmc-uboot-92369844ec7bf0e63de51e19b281fe3739e01397.zip
sunxi: Enable non-secure access to RTC on sun6i (A31s)
On the A31s the RTC is by default secured. Thus when u-boot loads the kernel in non-secure world, the RTC is unavailable. The SoC has a TrustZone Protection Controller, which can be used to enable non-secure access to the RTC. On the A31 the TZPC doesn't seem to do anything, i.e. changes to its register contents do not affect access to the RTC. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'arch/arm/include/asm/arch-sunxi')
-rw-r--r--arch/arm/include/asm/arch-sunxi/tzpc.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-sunxi/tzpc.h b/arch/arm/include/asm/arch-sunxi/tzpc.h
new file mode 100644
index 0000000000..ba4d43bc3a
--- /dev/null
+++ b/arch/arm/include/asm/arch-sunxi/tzpc.h
@@ -0,0 +1,23 @@
+/*
+ * (C) Copyright 2015 Chen-Yu Tsai <wens@csie.org>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _SUNXI_TZPC_H
+#define _SUNXI_TZPC_H
+
+#ifndef __ASSEMBLY__
+struct sunxi_tzpc {
+ u32 r0size; /* 0x00 Size of secure RAM region */
+ u32 decport0_status; /* 0x04 Status of decode protection port 0 */
+ u32 decport0_set; /* 0x08 Set decode protection port 0 */
+ u32 decport0_clear; /* 0x0c Clear decode protection port 0 */
+};
+#endif
+
+#define SUNXI_TZPC_DECPORT0_RTC (1 << 1)
+
+void tzpc_init(void);
+
+#endif /* _SUNXI_TZPC_H */
OpenPOWER on IntegriCloud