From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Mastro Gippo <gipmad@gmail.com>
Cc: a.zummo@towertech.it, linux-rtc@vger.kernel.org
Subject: Re: Infinite loop on edge cases
Date: Tue, 9 Apr 2019 11:01:19 +0200 [thread overview]
Message-ID: <20190409090119.GT7480@piout.net> (raw)
In-Reply-To: <CADjOgT97-8PM1=Nm+Mk4jw_8vzt3i9KXUohDAkUsptxS7JuU6Q@mail.gmail.com>
Hi,
On 09/04/2019 10:44:27+0200, Mastro Gippo wrote:
> Hello, I have been testing the latest RTC drivers on an OpenWrt build on a
> MTK7688 SOC and I got an infinite loop on boot that would block the entire
> system.
You should not use hctosys that would solve you boot issue.
> Basically, if I don't have a RTC connected, any read would return 0xFF.
> That may be also be a problem of the I2C driver, that instead of generating
> an error just returns that value. But this may happen in other cases, like
> if we add an EEPROM or another IC with the same address as the RTC, or the
> RTC IC fails in some unpredictable way.
> The current implementation of that piece of code has some bad practices
> that lead to infinite loops due to this error.
You have to fix the i2c bus driver because this one has to return an
error so regmap can handle it properly.
Regarding other cases, like adding an EEPROM or another IC with the same
address as the RTC. Then the answer is to fix your device tree. If it
doesn't properly describe your hardware, then you shouldn't expect Linux
to run properly.
But again, this infinite loop doesn't have to be fatal anyway, as long
as you are not using hctosys.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next parent reply other threads:[~2019-04-09 9:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CADjOgT97-8PM1=Nm+Mk4jw_8vzt3i9KXUohDAkUsptxS7JuU6Q@mail.gmail.com>
2019-04-09 9:01 ` Alexandre Belloni [this message]
2019-04-09 10:46 ` Infinite loop on edge cases Mastro Gippo
2019-04-09 11:27 ` Alexandre Belloni
2019-04-09 14:35 ` Mastro Gippo
2019-04-15 15:34 ` Alexandre Belloni
2019-04-09 8:46 Mastro Gippo
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=20190409090119.GT7480@piout.net \
--to=alexandre.belloni@bootlin.com \
--cc=a.zummo@towertech.it \
--cc=gipmad@gmail.com \
--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).