From: "andriy.shevchenko@linux.intel.com" <andriy.shevchenko@linux.intel.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: "Sanil, Shruthi" <shruthi.sanil@intel.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"mgross@linux.intel.com" <mgross@linux.intel.com>,
"Thokala, Srikanth" <srikanth.thokala@intel.com>,
"Raja Subramanian,
Lakshmi Bai" <lakshmi.bai.raja.subramanian@intel.com>,
"Sangannavar,
Mallikarjunappa" <mallikarjunappa.sangannavar@intel.com>
Subject: Re: [PATCH v8 2/2] clocksource: Add Intel Keem Bay timer support
Date: Thu, 3 Mar 2022 12:47:23 +0200 [thread overview]
Message-ID: <YiCcu7unsP5YDxun@smile.fi.intel.com> (raw)
In-Reply-To: <ce516de7-f1cf-c614-f9ff-439626dfafea@linaro.org>
On Thu, Mar 03, 2022 at 11:17:33AM +0100, Daniel Lezcano wrote:
> On 03/03/2022 07:18, Sanil, Shruthi wrote:
> > > > > > > > + if (!(val & TIM_CONFIG_PRESCALER_ENABLE)) { +
> > > > > > > > pr_err("%pOF: Prescaler is not enabled\n", np);
> > > > > > > > + ret = -ENODEV; + }
> > > > > > >
> > > > > > > Why bail out instead of enabling the prescalar ?
> > > > > >
> > > > > > Because it is a secure register and it would be updated by
> > > > > > the bootloader.
> > > > > Should it be considered as a firmware bug ?
> > > >
> > > > No. This is a common driver across products in the series and
> > > > enablement of this bit depends on the project requirements.
> > > > Hence
> > > > to be sure from driver, we added this check to avoid
> > > > initialization of the driver in the case where it cannot be
> > > > functional.
> > >
> > > I'm not sure to get the meaning of 'project requirements' but (for
> > > my understanding) why not describe the timer in the DT for such
> > > projects?
> > >
> >
> > OK, I understand your point now. We can control the driver
> > initialization from device tree binding rather than add a check in
> > the driver. But isn't it good to have a check, if enabling of the bit
> > is missed out in the FW? This can help in debugging.
>
> So if the description is in the DT but the prescaler bit is not enabled then
> the firmware is buggy, IIUC. Yeah, this check would help, may be add more
> context in the error message, eg. "Firmware has not enabled the prescaler
> bit" or something like that
For this we also use a FW_BUG prefix to printf()-like functions.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-03-03 10:48 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-22 9:56 [PATCH v8 0/2] Add the driver for Intel Keem Bay SoC timer block shruthi.sanil
2022-02-22 9:56 ` [PATCH v8 1/2] dt-bindings: timer: Add bindings for Intel Keem Bay SoC Timer shruthi.sanil
2022-02-22 23:13 ` Rob Herring
2022-02-23 7:49 ` Sanil, Shruthi
2022-02-23 11:30 ` Andy Shevchenko
2022-03-07 22:33 ` Rob Herring
2022-03-08 10:13 ` Andy Shevchenko
2022-03-18 5:36 ` Sanil, Shruthi
2022-06-06 17:47 ` Sanil, Shruthi
2022-06-16 3:42 ` Sanil, Shruthi
2022-02-22 9:56 ` [PATCH v8 2/2] clocksource: Add Intel Keem Bay timer support shruthi.sanil
2022-02-28 7:39 ` Sanil, Shruthi
2022-03-01 21:09 ` Daniel Lezcano
2022-03-02 10:12 ` Sanil, Shruthi
2022-03-02 10:24 ` Daniel Lezcano
2022-03-02 16:07 ` Sanil, Shruthi
2022-03-02 16:26 ` Daniel Lezcano
2022-03-03 6:18 ` Sanil, Shruthi
2022-03-03 10:17 ` Daniel Lezcano
2022-03-03 10:23 ` Sanil, Shruthi
2022-03-03 10:48 ` andriy.shevchenko
2022-03-03 10:51 ` Sanil, Shruthi
2022-03-03 10:47 ` andriy.shevchenko [this message]
2022-03-03 13:04 ` Daniel Lezcano
2022-03-02 13:54 ` andriy.shevchenko
2022-03-02 13:53 ` Andy Shevchenko
2022-03-02 15:58 ` Daniel Lezcano
2022-03-02 16:07 ` Andy Shevchenko
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=YiCcu7unsP5YDxun@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=lakshmi.bai.raja.subramanian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mallikarjunappa.sangannavar@intel.com \
--cc=mgross@linux.intel.com \
--cc=robh+dt@kernel.org \
--cc=shruthi.sanil@intel.com \
--cc=srikanth.thokala@intel.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).