[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250710083434.1821671-3-dev.tailor@samsung.com>
Date: Thu, 10 Jul 2025 14:04:33 +0530
From: Devang Tailor <dev.tailor@...sung.com>
To: robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
alim.akhtar@...sung.com, alexandre.belloni@...tlin.com,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-rtc@...r.kernel.org, faraz.ata@...sung.com
Cc: Devang Tailor <dev.tailor@...sung.com>
Subject: [PATCH v2 2/3] rtc: s3c: support for exynosautov9 on-chip RTC
The on-chip RTC of this SoC is almost similar to the previous
versions of SoC. Hence re-use the existing driver with platform specific
change to enable RTC.
This has been tested with 'hwclock' & 'date' utilities
Signed-off-by: Devang Tailor <dev.tailor@...sung.com>
---
drivers/rtc/rtc-s3c.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 5dd575865adf..8db24b6360b8 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -384,6 +384,15 @@ static void s3c6410_rtc_disable(struct s3c_rtc *info)
writew(con, info->base + S3C2410_RTCCON);
}
+static void exynosautov9_rtc_disable(struct s3c_rtc *info)
+{
+ unsigned int con;
+
+ con = readb(info->base + S3C2410_RTCCON);
+ con &= ~S3C2410_RTCCON_RTCEN;
+ writeb(con, info->base + S3C2410_RTCCON);
+}
+
static void s3c_rtc_remove(struct platform_device *pdev)
{
struct s3c_rtc *info = platform_get_drvdata(pdev);
@@ -574,6 +583,12 @@ static struct s3c_rtc_data const s3c6410_rtc_data = {
.disable = s3c6410_rtc_disable,
};
+static const struct s3c_rtc_data exynosautov9_rtc_data = {
+ .irq_handler = s3c6410_rtc_irq,
+ .enable = s3c24xx_rtc_enable,
+ .disable = exynosautov9_rtc_disable,
+};
+
static const __maybe_unused struct of_device_id s3c_rtc_dt_match[] = {
{
.compatible = "samsung,s3c2410-rtc",
@@ -590,6 +605,9 @@ static const __maybe_unused struct of_device_id s3c_rtc_dt_match[] = {
}, {
.compatible = "samsung,exynos3250-rtc",
.data = &s3c6410_rtc_data,
+ }, {
+ .compatible = "samsung,exynosautov9-rtc",
+ .data = &exynosautov9_rtc_data,
},
{ /* sentinel */ },
};
--
2.34.1
Powered by blists - more mailing lists