linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtc: zynqmp: Add shutdown callback for kexec support
@ 2025-07-24 17:05 Harini T
  2025-07-24 23:55 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Harini T @ 2025-07-24 17:05 UTC (permalink / raw)
  To: alexandre.belloni, michal.simek
  Cc: linux-rtc, linux-arm-kernel, linux-kernel, git, Harini T

During kexec, the hardware is not reset and any enabled interrupts can
interfere with the new kernel's RTC initialization.

The shutdown callback reuses the existing remove function to disable
alarm interrupts and wakeup capability, putting the device in a
quiescent state rather than completely removing it.

Signed-off-by: Harini T <harini.t@amd.com>
---
 drivers/rtc/rtc-zynqmp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/rtc/rtc-zynqmp.c b/drivers/rtc/rtc-zynqmp.c
index f39102b66eac..26893367f0f5 100644
--- a/drivers/rtc/rtc-zynqmp.c
+++ b/drivers/rtc/rtc-zynqmp.c
@@ -383,6 +383,7 @@ MODULE_DEVICE_TABLE(of, xlnx_rtc_of_match);
 static struct platform_driver xlnx_rtc_driver = {
 	.probe		= xlnx_rtc_probe,
 	.remove		= xlnx_rtc_remove,
+	.shutdown	= xlnx_rtc_remove,
 	.driver		= {
 		.name	= KBUILD_MODNAME,
 		.pm	= &xlnx_rtc_pm_ops,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rtc: zynqmp: Add shutdown callback for kexec support
  2025-07-24 17:05 [PATCH] rtc: zynqmp: Add shutdown callback for kexec support Harini T
@ 2025-07-24 23:55 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2025-07-24 23:55 UTC (permalink / raw)
  To: Harini T; +Cc: michal.simek, linux-rtc, linux-arm-kernel, linux-kernel, git

On 24/07/2025 22:35:17+0530, Harini T wrote:
> During kexec, the hardware is not reset and any enabled interrupts can
> interfere with the new kernel's RTC initialization.

Please elaborate on the issue because alarm are supposed to stay enabled across
reboots, this is the whole point of the RTC.

> 
> The shutdown callback reuses the existing remove function to disable
> alarm interrupts and wakeup capability, putting the device in a
> quiescent state rather than completely removing it.
> 
> Signed-off-by: Harini T <harini.t@amd.com>
> ---
>  drivers/rtc/rtc-zynqmp.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/rtc/rtc-zynqmp.c b/drivers/rtc/rtc-zynqmp.c
> index f39102b66eac..26893367f0f5 100644
> --- a/drivers/rtc/rtc-zynqmp.c
> +++ b/drivers/rtc/rtc-zynqmp.c
> @@ -383,6 +383,7 @@ MODULE_DEVICE_TABLE(of, xlnx_rtc_of_match);
>  static struct platform_driver xlnx_rtc_driver = {
>  	.probe		= xlnx_rtc_probe,
>  	.remove		= xlnx_rtc_remove,
> +	.shutdown	= xlnx_rtc_remove,
>  	.driver		= {
>  		.name	= KBUILD_MODNAME,
>  		.pm	= &xlnx_rtc_pm_ops,
> -- 
> 2.43.0
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-24 23:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-24 17:05 [PATCH] rtc: zynqmp: Add shutdown callback for kexec support Harini T
2025-07-24 23:55 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).