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: Tue, 11 Dec 2012 13:39:14 +0100 [thread overview]
Message-ID: <20121211123914.3CC5A200FD5@gemini.denx.de> (raw)
In-Reply-To: <1355223289-15685-5-git-send-email-hatim.rv@samsung.com>
Dear Hatim Ali,
In message <1355223289-15685-5-git-send-email-hatim.rv@samsung.com> you wrote:
> From: Akshay Saraswat <akshay.s@samsung.com>
>
> Adding a generic polling function to continuously monitor events and
> trigger actions corresponding to them.
>
> Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
> Acked-by: Simon Glass <sjg@chromium.org>
>
> diff --git a/README b/README
> index 037513a..0e4083c 100644
> --- a/README
> +++ b/README
> @@ -2841,6 +2841,13 @@ Configuration Settings:
> the application (usually a Linux kernel) when it is
> booted
>
> +- CONFIG_BOARD_POLL
> + There are various scenarios in which parallel-thread like
> + polling is required to monitor status of variety of devices.
> + For such situations CONFIG_BOARD_POLL shall be enabled
> + and funtion call board_poll_devices() from console_tstc()
> + will then poll for the device status as defined inside function.
Sorry, but I dislike this, for a number of reasons.
1) There is, and has always been, a very basic design decision, that
U-Boot is strictly single-tasking, i. e. we don't have any kind of
"background activities" goind on. Your introduction of a device
polling mechanism violates this principle.
I don't say that this is unacceptable, but we have to be aware that
this is a far-reaching decision, so we should consider it very
carefully.
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.
2) U-Boot is a boot loader, not an OS. Do we really need continuous
temperature management in U-Boot? I think not. After all, our
main purpose is to boot an OS, and do that as fast as possible.
The majority of users will see U-Boot running only for a few
milliseconds, and only when they boot the device - which may be
very seldom.
So what exactly do we need this for?
3) Your hooking of a device polling into console_tstc() is broken by
design. It may be sufficient for the specific use case you have
in mind here, but it is totally useless for any other purpose.
This needs a lot of additional thought, and major changes to the
implementation.
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
Without facts, the decision cannot be made logically. You must rely
on your human intuition.
-- Spock, "Assignment: Earth", stardate unknown
next prev parent reply other threads:[~2012-12-11 12:39 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 [this message]
2012-12-12 14:14 ` Simon Glass
2012-12-12 20:44 ` Wolfgang Denk
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=20121211123914.3CC5A200FD5@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