aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/mvebu')
-rw-r--r--target/linux/mvebu/patches-4.14/421-rtc-initialize.patch11
1 files changed, 5 insertions, 6 deletions
diff --git a/target/linux/mvebu/patches-4.14/421-rtc-initialize.patch b/target/linux/mvebu/patches-4.14/421-rtc-initialize.patch
index 47a5acc70d..5c21c67d6e 100644
--- a/target/linux/mvebu/patches-4.14/421-rtc-initialize.patch
+++ b/target/linux/mvebu/patches-4.14/421-rtc-initialize.patch
@@ -54,21 +54,20 @@ bootloader hacks that write special register values.
};
static const struct armada38x_rtc_data armada8k_data = {
-@@ -558,6 +580,17 @@ static __init int armada38x_rtc_probe(st
+@@ -558,6 +580,16 @@ static __init int armada38x_rtc_probe(st
+ if (ret)
dev_err(&pdev->dev, "Failed to register RTC device: %d\n", ret);
- return ret;
- }
-+
+
+ /*
+ * Try to detect if RTC is in uninitialized state.
+ * It is not definitive to know if the RTC is in an uninialized state or not,
+ * but the following call will read some bits in the RTC unit and guess if
+ * if it's in that state, and accordingly set it to sane default values.
+ */
-+ if (rtc->data->init_rtc) {
++ else if (rtc->data->init_rtc) {
+ rtc->data->init_rtc(rtc);
+ }
+
- return 0;
+ return ret;
}