Skip to content

Instantly share code, notes, and snippets.

@mansr
Created March 23, 2019 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mansr/028365a34b64e71180eb24097152f107 to your computer and use it in GitHub Desktop.
Save mansr/028365a34b64e71180eb24097152f107 to your computer and use it in GitHub Desktop.
From e8a299f4cb086653c250f61572315a61981e35c2 Mon Sep 17 00:00:00 2001
From: Mans Rullgard <mans@mansr.com>
Date: Wed, 16 Jan 2019 14:33:53 +0000
Subject: [PATCH] rtc: sunxi: use external oscillator
---
drivers/rtc/rtc-sunxi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/rtc/rtc-sunxi.c b/drivers/rtc/rtc-sunxi.c
index 21865d3d8fe8..cdfb12e753db 100644
--- a/drivers/rtc/rtc-sunxi.c
+++ b/drivers/rtc/rtc-sunxi.c
@@ -472,6 +472,9 @@ static int sunxi_rtc_probe(struct platform_device *pdev)
return -ENODEV;
}
+ /* use external oscillator */
+ writel(0x16aa0001, chip->base + SUNXI_LOSC_CTRL);
+
/* clear the alarm count value */
writel(0, chip->base + SUNXI_ALRM_DHMS);
--
2.21.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment