All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Kocialkowski <contact@paulk.fr>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/7] kc1: Proper reboot mode and boot reason validation
Date: Tue, 29 Mar 2016 14:14:34 +0200	[thread overview]
Message-ID: <1459253674.1282.16.camel@paulk.fr> (raw)
In-Reply-To: <20160328140652.GL23166@bill-the-cat>

Le lundi 28 mars 2016 ? 10:06 -0400, Tom Rini a ?crit?:
> On Mon, Mar 28, 2016 at 02:07:13PM +0200, Paul Kocialkowski wrote:
> > With the previous implementation, rebooting without registering a recognized
> > reboot mode would end up with U-Boot checking for a valid power-on reason,
> > which
> > might result in the device turning off (e.g. with no USB cable attached and
> > no
> > buttons pressed).
> > 
> > Since this approach is not viable (breaks reboot in most cases), the
> > validity of
> > the reboot reason is checked (in turn, by checking that a warm reset
> > happened,
> > as there is no magic) to detect a reboot and the 'o' char is recognized to
> > indicate that power-off is required. Still, that might be overridden by the
> > detection of usual power-on reasons, on purpose.
> > 
> > Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> 
> ... but since Sniper and KC1 are doing the same thing, and other OMAP
> devices that are also Android devices will also be in the same camp, can
> we perhaps include some of the above information in a comment, make
> android_omap_reboot_mode (or something along those lines) in
> arch/arm/cpu/armv7/omap-common/something-appropriate.c ?

The way things are done now, a few distinct aspects are tied together in my
approach:
* reboot mode storage, which is Android-specific and also involves the boot
command
* valid power-on reason checking, which relies on twl code, that I'm not
comfortable making part of the omap arch code
* device-specific reboot mode setting (overriding omap reboot mode), e.g. from
buttons

So I think we could go with the following:
* Making the twl code common on each twl power driver
* Making the Android aspects common through functions dealing with the reboot-
mode env variable and associated boot command, with their own Kconfig option
* Keeping the global coordination between these in each board file, to handle
device-specific input and quirks

I'd rather make a clean new series to support that.

What do you think?

-- 
Paul Kocialkowski, low-level free software developer on embedded devices

Website: https://www.paulk.fr/
Coding blog: https://code.paulk.fr/
Git repositories: https://git.paulk.fr/ https://git.code.paulk.fr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160329/9e443309/attachment.sig>

  reply	other threads:[~2016-03-29 12:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-28 12:07 [U-Boot] [PATCH 1/7] sniper: Include explicit serial baudrate on bootargs Paul Kocialkowski
2016-03-28 12:07 ` [U-Boot] [PATCH 2/7] kc1: " Paul Kocialkowski
2016-03-28 14:06   ` Tom Rini
2016-03-28 12:07 ` [U-Boot] [PATCH 3/7] kc1: Select libfdt to allow running devicetree-based kernels Paul Kocialkowski
2016-03-28 14:06   ` Tom Rini
2016-03-28 12:07 ` [U-Boot] [PATCH 4/7] kc1: Add some sysboot and devicetree-related environment variables Paul Kocialkowski
2016-03-28 14:06   ` Tom Rini
2016-03-28 12:07 ` [U-Boot] [PATCH 5/7] sniper: Proper reboot mode and boot reason validation Paul Kocialkowski
2016-03-28 14:06   ` Tom Rini
2016-03-28 12:07 ` [U-Boot] [PATCH 6/7] kc1: " Paul Kocialkowski
2016-03-28 14:06   ` Tom Rini
2016-03-29 12:14     ` Paul Kocialkowski [this message]
2016-04-08 23:34       ` Tom Rini
2016-03-28 12:07 ` [U-Boot] [PATCH 7/7] sniper: Change vendor name from lge to lg, matching devicetree vendor prefix Paul Kocialkowski
2016-03-28 14:06   ` Tom Rini
2016-03-28 14:06 ` [U-Boot] [PATCH 1/7] sniper: Include explicit serial baudrate on bootargs Tom Rini

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=1459253674.1282.16.camel@paulk.fr \
    --to=contact@paulk.fr \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.