mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: gituser@www.linux-watchdog.org
To: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
Cc: Guenter Roeck <linux@roeck-us.net>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Wim Van Sebroeck <wim@linux-watchdog.org>,
	linux-arm-msm@vger.kernel.org, linux-watchdog@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] watchdog: qcom: fine tune the max timeout value calculation
Date: Sun, 3 Mar 2024 14:15:22 +0100	[thread overview]
Message-ID: <20240303131522.GA28319@www.linux-watchdog.org> (raw)
In-Reply-To: <9f084781-2233-4b36-8b1c-db1fa9a9db49@quicinc.com>

Ji Kathiravan,

> 
> On 2/3/2024 12:07 PM, Kathiravan Thirumoorthy wrote:
> >
> >
> >On 1/16/2024 8:32 PM, Guenter Roeck wrote:
> >>On 1/16/24 00:22, Kathiravan Thirumoorthy wrote:
> >>>To determine the max_timeout value, the below calculation is used.
> >>>
> >>>    max_timeout = 0x10000000 / clk_rate
> >>>
> >>>cat /sys/devices/platform/soc@0/b017000.watchdog/watchdog/watchdog0/max_timeout
> >>>8388
> >>>
> >>>However, this is not valid for all the platforms. IPQ SoCs starting from
> >>>IPQ40xx and recent Snapdragron SoCs also has the bark and bite
> >>>time field
> >>>length of 20bits, which can hold max up to 32 seconds if the clk_rate is
> >>>32KHz.
> >>>
> >>>If the user tries to configure the timeout more than 32s, then the value
> >>>will be truncated and the actual value will not be reflected in the HW.
> >>>
> >>>To avoid this, lets add a variable called max_tick_count in
> >>>the device data,
> >>>which defines max counter value of the WDT controller. Using
> >>>this, max-timeout
> >>>will be calculated in runtime for various WDT contorllers.
> >>>
> >>>With this change, we get the proper max_timeout as below and restricts
> >>>the user from configuring the timeout higher than this.
> >>>
> >>>cat /sys/devices/platform/soc@0/b017000.watchdog/watchdog/watchdog0/max_timeout
> >>>32
> >>>
> >>>Signed-off-by: Kathiravan Thirumoorthy <quic_kathirav@quicinc.com>
> >>
> >>Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> >
> >
> >Guenter / Will, Can this be picked for v6.9? I don't see this in
> >linux- next yet, so please consider this as a gentle reminder!
> 
> 
> Guenter / Will, Gentle Reminder... is this change queued for v6.9?

Yes, it is.

Kind regards,
Wim.


      reply	other threads:[~2024-03-03 13:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-16  8:22 Kathiravan Thirumoorthy
2024-01-16 15:02 ` Guenter Roeck
2024-02-03  6:37   ` Kathiravan Thirumoorthy
2024-02-27 15:06     ` Kathiravan Thirumoorthy
2024-03-03 13:15       ` gituser [this message]

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=20240303131522.GA28319@www.linux-watchdog.org \
    --to=gituser@www.linux-watchdog.org \
    --cc=andersson@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=quic_kathirav@quicinc.com \
    --cc=wim@linux-watchdog.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®