From: Wei Fu <[email protected]>
This patch add Counter Prescaler support in APM X-Gene RTC driver by
getting prescaler (Optional) property value from dtb.
This hardware support can only be found in DW_apb_rtc after v2.06a.
And adds the optional property "prescaler" in bindings for APM X-Gene RTC.
Because the clock source on some platform to RTC is NOT 1HZ,
so we need to prescale the clock to make the input clock become 1HZ,
like (32K/prescaler) = 1HZ on the XuanTie TH1520 AP sub-system RTC.
This patch also add "snps,dw-apb-rtc" into the "compatible".
Since XuanTie TH1520 is using the same RTC, so this patch enables
APM X-Gene RTC driver for XuanTie TH1520, and add a device node in
the XuanTie TH1520 Soc dts: th1520.dtsi.
Wei Fu (5):
drivers/rtc/rtc-xgene: Add prescaler support in APM X-Gene RTC driver
dt-bindings: rtc: Add optional property "prescaler" in APM X-Gene RTC
Document
drivers/rtc/rtc-xgene: Add "snps,dw-apb-rtc" into the "compatible"
Kconfig: Enable APM X-Gene RTC for XuanTie TH1520
riscv: dts: thead: Add XuanTie TH1520 RTC device node
.../devicetree/bindings/rtc/xgene-rtc.txt | 16 ++++++++++
arch/riscv/boot/dts/thead/th1520.dtsi | 11 +++++++
drivers/rtc/Kconfig | 12 ++++++-
drivers/rtc/rtc-xgene.c | 32 +++++++++++++++++++
4 files changed, 70 insertions(+), 1 deletion(-)
--
2.44.0
From: Wei Fu <[email protected]>
This patch add "snps,dw-apb-rtc" into the "compatible".
Signed-off-by: Wei Fu <[email protected]>
---
drivers/rtc/rtc-xgene.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rtc/rtc-xgene.c b/drivers/rtc/rtc-xgene.c
index 4d6f1629b973..5163682f9816 100644
--- a/drivers/rtc/rtc-xgene.c
+++ b/drivers/rtc/rtc-xgene.c
@@ -287,6 +287,7 @@ static SIMPLE_DEV_PM_OPS(xgene_rtc_pm_ops, xgene_rtc_suspend, xgene_rtc_resume);
#ifdef CONFIG_OF
static const struct of_device_id xgene_rtc_of_match[] = {
{.compatible = "apm,xgene-rtc" },
+ {.compatible = "snps,dw-apb-rtc" },
{ }
};
MODULE_DEVICE_TABLE(of, xgene_rtc_of_match);
--
2.44.0
On 12/04/2024 10:01, [email protected] wrote:
> From: Wei Fu <[email protected]>
>
> This patch add "snps,dw-apb-rtc" into the "compatible".
Please do not use "This commit/patch/change", but imperative mood. See
longer explanation here:
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95
This we see from the patch. Say what hardware are you adding?
Please run scripts/checkpatch.pl and fix reported warnings. Then please
run `scripts/checkpatch.pl --strict` and (probably) fix more warnings.
Some warnings can be ignored, especially from --strict run, but the code
here looks like it needs a fix. Feel free to get in touch if the warning
is not clear.
Best regards,
Krzysztof
On Fri, Apr 12, 2024 at 11:17:38AM +0200, Krzysztof Kozlowski wrote:
> On 12/04/2024 10:01, [email protected] wrote:
> > From: Wei Fu <[email protected]>
> >
> > This patch add "snps,dw-apb-rtc" into the "compatible".
>
>
> Please do not use "This commit/patch/change", but imperative mood. See
> longer explanation here:
> https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95
>
> This we see from the patch. Say what hardware are you adding?
The compatible, unless I misread the patchset, isn't actually documented
either, only the new property is.
>
> Please run scripts/checkpatch.pl and fix reported warnings. Then please
> run `scripts/checkpatch.pl --strict` and (probably) fix more warnings.
> Some warnings can be ignored, especially from --strict run, but the code
> here looks like it needs a fix. Feel free to get in touch if the warning
> is not clear.
>
>
> Best regards,
> Krzysztof
>