summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-01-21 13:13:35 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2022-01-21 13:13:35 +0200
commit75242f31db6cabf602a5eb84c13b579099d72a65 (patch)
tree03db019bd9d14a190428caa4333b2651e113c6cc /arch
parentc2c94b3b187dc92b2002809f489e0f24a41e91bc (diff)
parent5ceee540fdc7f1d65ca6e2b1b193ce5aa95ab99c (diff)
Merge tag 'rtc-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC updates from Alexandre Belloni: "Two new drivers this cycle and a significant rework of the CMOS driver make the bulk of the changes. I also carry powerpc changes with the agreement of Michael. New drivers: - Sunplus SP7021 RTC - Nintendo GameCube, Wii and Wii U RTC Driver updates: - cmos: refactor UIP handling and presence check, fix century - rs5c372: offset correction support, report low voltage - rv8803: Epson RX8804 support" * tag 'rtc-5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (33 commits) rtc: sunplus: fix return value in sp_rtc_probe() rtc: cmos: Evaluate century appropriate rtc: gamecube: Fix an IS_ERR() vs NULL check rtc: mc146818-lib: fix signedness bug in mc146818_get_time() dt-bindings: rtc: qcom-pm8xxx-rtc: update register numbers rtc: pxa: fix null pointer dereference rtc: ftrtc010: Use platform_get_irq() to get the interrupt rtc: Move variable into switch case statement rtc: pcf2127: Fix typo in comment dt-bindings: rtc: Add Sunplus RTC json-schema rtc: Add driver for RTC in Sunplus SP7021 rtc: rs5c372: fix incorrect oscillation value on r2221tl rtc: rs5c372: add offset correction support rtc: cmos: avoid UIP when writing alarm time rtc: cmos: avoid UIP when reading alarm time rtc: mc146818-lib: refactor mc146818_does_rtc_work rtc: mc146818-lib: refactor mc146818_get_time rtc: mc146818-lib: extract mc146818_avoid_UIP rtc: mc146818-lib: fix RTC presence check rtc: Check return value from mc146818_get_time() ...
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/rtc.c7
-rw-r--r--arch/powerpc/boot/dts/wii.dts5
-rw-r--r--arch/powerpc/configs/gamecube_defconfig2
-rw-r--r--arch/powerpc/configs/wii_defconfig2
-rw-r--r--arch/x86/kernel/hpet.c8
5 files changed, 19 insertions, 5 deletions
diff --git a/arch/alpha/kernel/rtc.c b/arch/alpha/kernel/rtc.c
index ce3077946e1d..fb3025396ac9 100644
--- a/arch/alpha/kernel/rtc.c
+++ b/arch/alpha/kernel/rtc.c
@@ -80,7 +80,12 @@ init_rtc_epoch(void)
static int
alpha_rtc_read_time(struct device *dev, struct rtc_time *tm)
{
- mc146818_get_time(tm);
+ int ret = mc146818_get_time(tm);
+
+ if (ret < 0) {
+ dev_err_ratelimited(dev, "unable to read current time\n");
+ return ret;
+ }
/* Adjust for non-default epochs. It's easier to depend on the
generic __get_rtc_time and adjust the epoch here than create
diff --git a/arch/powerpc/boot/dts/wii.dts b/arch/powerpc/boot/dts/wii.dts
index e9c945b123c6..e46143c32308 100644
--- a/arch/powerpc/boot/dts/wii.dts
+++ b/arch/powerpc/boot/dts/wii.dts
@@ -168,6 +168,11 @@
interrupts = <14>;
};
+ srnprot@d800060 {
+ compatible = "nintendo,hollywood-srnprot";
+ reg = <0x0d800060 0x4>;
+ };
+
GPIO: gpio@d8000c0 {
#gpio-cells = <2>;
compatible = "nintendo,hollywood-gpio";
diff --git a/arch/powerpc/configs/gamecube_defconfig b/arch/powerpc/configs/gamecube_defconfig
index 24c0e0ea5aeb..91a1b99f4e8f 100644
--- a/arch/powerpc/configs/gamecube_defconfig
+++ b/arch/powerpc/configs/gamecube_defconfig
@@ -68,7 +68,7 @@ CONFIG_SND_SEQUENCER=y
CONFIG_SND_SEQUENCER_OSS=y
# CONFIG_USB_SUPPORT is not set
CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_GENERIC=y
+CONFIG_RTC_DRV_GAMECUBE=y
CONFIG_EXT2_FS=y
CONFIG_EXT4_FS=y
CONFIG_ISO9660_FS=y
diff --git a/arch/powerpc/configs/wii_defconfig b/arch/powerpc/configs/wii_defconfig
index a0c45bf2bfb1..0ab78c51455d 100644
--- a/arch/powerpc/configs/wii_defconfig
+++ b/arch/powerpc/configs/wii_defconfig
@@ -98,7 +98,7 @@ CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_PANIC=y
CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_GENERIC=y
+CONFIG_RTC_DRV_GAMECUBE=y
CONFIG_NVMEM_NINTENDO_OTP=y
CONFIG_EXT2_FS=y
CONFIG_EXT4_FS=y
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 882213df3713..71f336425e58 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -1435,8 +1435,12 @@ irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id)
hpet_rtc_timer_reinit();
memset(&curr_time, 0, sizeof(struct rtc_time));
- if (hpet_rtc_flags & (RTC_UIE | RTC_AIE))
- mc146818_get_time(&curr_time);
+ if (hpet_rtc_flags & (RTC_UIE | RTC_AIE)) {
+ if (unlikely(mc146818_get_time(&curr_time) < 0)) {
+ pr_err_ratelimited("unable to read current time from RTC\n");
+ return IRQ_HANDLED;
+ }
+ }
if (hpet_rtc_flags & RTC_UIE &&
curr_time.tm_sec != hpet_prev_update_sec) {