All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Prabhakar <prabhakar.csengg@gmail.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Magnus Damm <magnus.damm@gmail.com>,
	linux-rtc@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Prabhakar <prabhakar.csengg+renesas@gmail.com>,
	Biju Das <biju.das.jz@bp.renesas.com>,
	Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH v4 09/15] rtc: rzn1: Dynamically calculate synchronization delay based on clock rate
Date: Wed, 19 Aug 2026 15:08:21 +0200	[thread overview]
Message-ID: <aoWqxdIpvTP8zoOX@shikoro> (raw)
In-Reply-To: <20260819103926.2136712-10-prabhakar.mahadev-lad.rj@bp.renesas.com>

[-- Attachment #1: Type: text/plain, Size: 1047 bytes --]

On Wed, Aug 19, 2026 at 11:39:20AM +0100, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> 
> Replace the hardcoded hardware synchronization delays with a calculated
> time window derived from the operating sub-clock frequency.
> 
> The driver currently hardcodes microsecond ranges assuming a fixed
> sub-clock frequency of 32.768 kHz. Newer SoC variants, such as the
> RZ/T2H, drive this hardware block using a much faster clock rate
> (~195.3 kHz). Hardcoding these wait windows forces faster blocks to
> over-sleep, introducing unnecessary delays during clock initialization
> and register configuration.
> 
> Calculate the duration of the required clock cycles in microseconds based
> on the runtime clock rate, and store this value in the driver private
> structure to adjust the usleep_range() and readl_poll_timeout() boundaries
> dynamically.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2026-08-19 13:08 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 10:39 [PATCH v4 00/15] Add RTC support for Renesas RZ/T2H and RZ/N2H SoCs Prabhakar
2026-08-19 10:39 ` [PATCH v4 01/15] dt-bindings: rtc: renesas,rzn1-rtc: Add RZ/T2H and RZ/N2H support Prabhakar
2026-08-19 10:48   ` sashiko-bot
2026-08-19 10:39 ` [PATCH v4 02/15] rtc: rzn1: Handle EPROBE_DEFER for optional pps interrupt Prabhakar
2026-08-19 10:46   ` sashiko-bot
2026-08-19 10:39 ` [PATCH v4 03/15] rtc: rzn1: Fix weekday underflow when alarm crosses month boundary Prabhakar
2026-08-19 10:53   ` sashiko-bot
2026-08-19 13:01     ` Wolfram Sang
2026-08-19 12:57   ` Wolfram Sang
2026-08-19 10:39 ` [PATCH v4 04/15] rtc: rzn1: Fix malformed MODULE_AUTHOR string Prabhakar
2026-08-19 10:43   ` sashiko-bot
2026-08-19 10:39 ` [PATCH v4 05/15] rtc: Kconfig: Broaden RTC_DRV_RZN1 dependency to ARCH_RENESAS Prabhakar
2026-08-19 10:44   ` sashiko-bot
2026-08-19 10:39 ` [PATCH v4 06/15] rtc: rzn1: Fix alarm range check truncation on 32-bit systems Prabhakar
2026-08-19 10:50   ` sashiko-bot
2026-08-19 13:05     ` Wolfram Sang
2026-08-19 10:39 ` [PATCH v4 07/15] rtc: rzn1: Replace remove callback with devm_add_action_or_reset() Prabhakar
2026-08-19 10:50   ` sashiko-bot
2026-08-19 13:06     ` Wolfram Sang
2026-08-19 10:39 ` [PATCH v4 08/15] rtc: rzn1: Use pm_runtime_put_sync() in rzn1_rtc_disable_hardware() Prabhakar
2026-08-19 10:51   ` sashiko-bot
2026-08-19 13:07     ` Wolfram Sang
2026-08-19 10:39 ` [PATCH v4 09/15] rtc: rzn1: Dynamically calculate synchronization delay based on clock rate Prabhakar
2026-08-19 10:47   ` sashiko-bot
2026-08-19 13:08   ` Wolfram Sang [this message]
2026-08-19 10:39 ` [PATCH v4 10/15] rtc: rzn1: Use temporary variable for struct device Prabhakar
2026-08-19 10:46   ` sashiko-bot
2026-08-19 10:39 ` [PATCH v4 11/15] rtc: rzn1: Consistently use dev_err_probe() Prabhakar
2026-08-19 10:46   ` sashiko-bot
2026-08-19 10:39 ` [PATCH v4 12/15] rtc: rzn1: use FIELD_PREP/FIELD_GET and GENMASK for register access Prabhakar
2026-08-19 10:49   ` sashiko-bot
2026-08-19 13:09     ` Wolfram Sang
2026-08-19 10:39 ` [PATCH v4 13/15] rtc: rzn1: Add OF match data to gate SUBU " Prabhakar
2026-08-19 10:47   ` sashiko-bot
2026-08-19 13:12   ` Wolfram Sang
2026-08-19 10:39 ` [PATCH v4 14/15] rtc: rzn1: Drop trailing comma from OF match table sentinel Prabhakar
2026-08-19 10:47   ` sashiko-bot
2026-08-19 13:13   ` Wolfram Sang
2026-08-19 10:39 ` [PATCH v4 15/15] rtc: rzn1: Add support for Renesas RZ/T2H and RZ/N2H SoCs Prabhakar
2026-08-19 10:52   ` sashiko-bot
2026-08-19 13:14   ` Wolfram Sang
2026-08-19 13:15 ` [PATCH v4 00/15] Add RTC " Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aoWqxdIpvTP8zoOX@shikoro \
    --to=wsa+renesas@sang-engineering.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=prabhakar.csengg+renesas@gmail.com \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.