From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/8] Add a poll function to monitor events
Date: Wed, 12 Dec 2012 21:44:59 +0100 [thread overview]
Message-ID: <20121212204459.BA57D200FD0@gemini.denx.de> (raw)
In-Reply-To: <CAPnjgZ3VedAoM9tkzHoHWPi9cAJ=6WQ4CDOb0zQMgi7XwGwWBQ@mail.gmail.com>
Dear Simon Glass,
In message <CAPnjgZ3VedAoM9tkzHoHWPi9cAJ=6WQ4CDOb0zQMgi7XwGwWBQ@mail.gmail.com> you wrote:
>
> > If anything like this gets implemented, it has to be done in a way
> > that will be general enough to be useful to others as well.
>
> Yes. It isn't really clear how this sort of thing should be done, but
> creating a board polling function seems like a reasonable idea. It's
> then just a question of when to call it. Since there is no particular
> idle or event loop in U-Boot, perhaps we need to create one, and the
> console code is probably the only sensible place since it is waiting
> for user input.
No, using the console driver for such a hook is not sensible at all.
Do we really have to re-invent the wheel each time we need one?
If we need a periodic service, then this should be obviously (at least
this seems obvious to me) be bound to the timer services. On PPC, we
could for example simply hook it in the timer interrupt.
Also, this should not be considered as somethin board specific as the
name "board polling function" might suggest. What is being discussed
here is not more and not less than support for periodic, asynchronous
services. So let's call it that, so everybody understand what it's
about.
> I am not sure about the general issue. Obviously some sort of
> background activity is going on in the chip all the time, and
> monitoring is sometimes necessary. I am not sure about the best
> approach for this.
I agree about the "sometimes necessary". In this specific case, I
doubt is this is one of these "some" cases. But I asked this before.
> By monitoring temperature we can be sure that the system does not
> overheat - it does depend on the hardware of course (power output,
> heatsinks) but it can happen very quickly, certainly within a few 10s
> of seconds.
Is this some theoretical consideration, or does it refer to the actual
state of a specific piece of hardware?
Assume we have such a system - how would it be going to be used?
Example:
- power on
- U-Boot enters (either directly or as a result of some boot
error or similar) the interactive command line interface and
waits for input from the user
- temperature monitoring detects overheating
- system powers down
How would one recover from that?
Would it not make much more sense to bring up the system in such a
mode of operation that no overheating will happen?
> > This needs a lot of additional thought, and major changes to the
> > implementation.
>
> Perhaps add a new idle function in common code which can be called
> from various places (including console), and itself calls
> board_poll_devices()? That is cosmetic, but does at least detach the
> code from the console.
No. This is crap. If we need a periodic service, we should implement
one, and not add hooks here and there at random. We already did this
once (for the watchdog triggering), and look what a crap it is. We
should not repeat this.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I often quote myself; it adds spice to my conversation. - G. B. Shaw
next prev parent reply other threads:[~2012-12-12 20:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-11 10:54 [U-Boot] [PATCH 0/8 v4] Add TMU support for Exynos5250 based SMDK5250 Hatim Ali
2012-12-11 10:54 ` [U-Boot] [PATCH 1/8] EXYNOS5: FDT: Add TMU device node values Hatim Ali
2012-12-12 14:51 ` Simon Glass
2012-12-11 10:54 ` [U-Boot] [PATCH 2/8] EXYNOS5: TMU: Add driver for Thermal Management Unit Hatim Ali
2012-12-11 12:41 ` Wolfgang Denk
2012-12-11 10:54 ` [U-Boot] [PATCH 3/8] EXYNOS5: Power down API " Hatim Ali
2012-12-11 12:43 ` Wolfgang Denk
2012-12-12 14:00 ` Simon Glass
2012-12-12 20:27 ` Wolfgang Denk
2012-12-11 10:54 ` [U-Boot] [PATCH 4/8] Add a poll function to monitor events Hatim Ali
2012-12-11 12:39 ` Wolfgang Denk
2012-12-12 14:14 ` Simon Glass
2012-12-12 20:44 ` Wolfgang Denk [this message]
2012-12-12 21:07 ` Simon Glass
2012-12-12 22:11 ` Wolfgang Denk
2012-12-12 23:34 ` Simon Glass
2012-12-13 10:23 ` Wolfgang Denk
2012-12-11 10:54 ` [U-Boot] [PATCH 5/8] EXYNOS5: TMU: Add TMU status polling Hatim Ali
2012-12-11 10:54 ` [U-Boot] [PATCH 6/8] EXYNOS5: Config: Enable support for Exynos TMU driver Hatim Ali
2012-12-11 10:54 ` [U-Boot] [PATCH 7/8] TMU: Add u-boot command to read current temp Hatim Ali
2012-12-11 12:30 ` Wolfgang Denk
2012-12-12 13:57 ` Simon Glass
2012-12-12 20:26 ` Wolfgang Denk
2012-12-11 10:54 ` [U-Boot] [PATCH 8/8] EXYNOS5: Config: Enable tmu command Hatim Ali
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=20121212204459.BA57D200FD0@gemini.denx.de \
--to=wd@denx.de \
--cc=u-boot@lists.denx.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