linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: "Kevin P. Fleming" <kevin+linux@km6g.us>
Cc: linux-rtc@vger.kernel.org
Subject: Re: abx80x: RV-1805 initialization order correct?
Date: Sat, 30 May 2020 22:25:03 +0200	[thread overview]
Message-ID: <20200530202503.GB316755@piout.net> (raw)
In-Reply-To: <CAE+UdorayxG79wDW8Up6-O_LdoBvcqQNQ4yYM90n2kv+XAu4+g@mail.gmail.com>

Hi,

On 29/05/2020 07:13:00-0400, Kevin P. Fleming wrote:
> The driver has a block of RV-1805-specific code (under the comment
> 'Configure RV1805 specifics'), which is executed before the part
> autodetection code (under the comment 'part autodetection').
> 
> If the driver is loaded with the 'generic' device data for abx80x, and
> the actual part in use is an RV-1805, the part-specific code won't be
> executed. I'm using this driver in a dynamic Device Tree environment,
> and at the moment I can't specify the part as the driver is loaded
> (although I could modify the overlay to support that if required).
> 
> So the question is: does the RV-1805 specific code *have* to be
> executed before part autodetection in order to avoid the lockup
> situation mentioned in the comments, or could it be moved immediately
> after the autodetection so that it will be always be executed for an
> RV-1805 part?

You can't detect the difference between the rv1805 and the ab1805 with
the id registers as both have 0x1805 so you will always have to use the
correct compatible string for it. The position of the code doesn't
matter.

Basically, the autodetection should never be used as the device tree
must describe the actual hardware. My point of view is that this was a
mistake to have it in the driver in the first place.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2020-05-30 20:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29 11:13 abx80x: RV-1805 initialization order correct? Kevin P. Fleming
2020-05-30 20:25 ` Alexandre Belloni [this message]
2020-05-30 21:54   ` Kevin P. Fleming

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=20200530202503.GB316755@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=kevin+linux@km6g.us \
    --cc=linux-rtc@vger.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 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).