Created
August 24, 2015 21:15
-
-
Save ssvb/ba01a221603d9719e2f5 to your computer and use it in GitHub Desktop.
Patch for U-Boot to allow access to RTC clock from non-secure mode on Allwinner A31s to fix /dev/rtc in Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c | |
index f01846e..cd06c72 100644 | |
--- a/arch/arm/cpu/armv7/sunxi/board.c | |
+++ b/arch/arm/cpu/armv7/sunxi/board.c | |
@@ -106,6 +106,10 @@ void s_init(void) | |
* access gets messed up (seems cache related) */ | |
setbits_le32(SUNXI_SRAMC_BASE + 0x44, 0x1800); | |
#endif | |
+#if defined CONFIG_MACH_SUN6I | |
+ /* Allow access to RTC clock from non-secure mode */ | |
+ writel(2, SUNXI_TZPC_BASE + 0x8); | |
+#endif | |
#if defined CONFIG_MACH_SUN6I || \ | |
defined CONFIG_MACH_SUN7I || \ | |
defined CONFIG_MACH_SUN8I |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment