mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-02 07:27:49 +00:00
Allwinner: H6: Add RTC workaround
This commit is contained in:
parent
48b85f763e
commit
6270d8fe08
@ -0,0 +1,41 @@
|
|||||||
|
From 7c8b4644df51ba7ecd68a6898bcb041ab669ddf9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||||
|
Date: Sun, 25 Aug 2019 00:02:06 +0200
|
||||||
|
Subject: [PATCH] RTC workaround
|
||||||
|
|
||||||
|
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||||
|
---
|
||||||
|
drivers/rtc/rtc-sun6i.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c
|
||||||
|
index 4603a91c11be..d8a0817b96f4 100644
|
||||||
|
--- a/drivers/rtc/rtc-sun6i.c
|
||||||
|
+++ b/drivers/rtc/rtc-sun6i.c
|
||||||
|
@@ -33,6 +33,7 @@
|
||||||
|
#define SUN6I_LOSC_CTRL 0x0000
|
||||||
|
#define SUN6I_LOSC_CTRL_KEY (0x16aa << 16)
|
||||||
|
#define SUN6I_LOSC_CTRL_AUTO_SWT_BYPASS BIT(15)
|
||||||
|
+#define SUN6I_LOSC_CTRL_AUTO_SWT_EN BIT(14)
|
||||||
|
#define SUN6I_LOSC_CTRL_ALM_DHMS_ACC BIT(9)
|
||||||
|
#define SUN6I_LOSC_CTRL_RTC_HMS_ACC BIT(8)
|
||||||
|
#define SUN6I_LOSC_CTRL_RTC_YMD_ACC BIT(7)
|
||||||
|
@@ -253,6 +254,7 @@ static void __init sun6i_rtc_clk_init(struct device_node *node,
|
||||||
|
|
||||||
|
/* Switch to the external, more precise, oscillator */
|
||||||
|
reg |= SUN6I_LOSC_CTRL_EXT_OSC;
|
||||||
|
+ reg |= SUN6I_LOSC_CTRL_AUTO_SWT_EN;
|
||||||
|
if (rtc->data->has_losc_en)
|
||||||
|
reg |= SUN6I_LOSC_CTRL_EXT_LOSC_EN;
|
||||||
|
writel(reg, rtc->base + SUN6I_LOSC_CTRL);
|
||||||
|
@@ -370,7 +372,6 @@ static const struct sun6i_rtc_clk_data sun50i_h6_rtc_data = {
|
||||||
|
.has_out_clk = 1,
|
||||||
|
.export_iosc = 1,
|
||||||
|
.has_losc_en = 1,
|
||||||
|
- .has_auto_swt = 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
static void __init sun50i_h6_rtc_clk_init(struct device_node *node)
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user