From: Eric Nelson <eric.nelson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] common/cmd_rsmode.c: add imx reset mode command
Date: Sun, 27 May 2012 10:16:35 -0700 [thread overview]
Message-ID: <4FC26173.9060907@boundarydevices.com> (raw)
In-Reply-To: <4FC1C403.6000409@googlemail.com>
Hi Dirk,
On 05/26/2012 11:04 PM, Dirk Behme wrote:
> Hi Troy,
>
> On 26.05.2012 23:01, Troy Kisky wrote:
>> This is useful for forcing the ROM's
>> usb downloader to activate upon a watchdog reset.
>> Or, you can boot from either SD Card.
>
> Thanks!
>
> Just for my understanding: Who will enable/run the watchdog reset? It was my
> understanding that after writing gpr9 and gpr10 someone has to enable the
> watchdog to execute the reset?
>
Or just issue the 'reset' command, so we can prevent the need to
re-program the SPI ROM with the boot to SD shim with something like
this:
U-Boot> set bootcmd 'rsmode esdhc3 && reset' && saveenv
I discussed this with Troy yesterday and would like to get some feedback
from those most likely to use the features of this code.
Troy's implementation exposes the internals and all of the power
of the reset mode override feature. Through the 'rsmode' command,
you can set up what happens during the next watchdog reset and then do
something else.
For instance, you could say 'rsmode esdhc1', set up the watchdog and
then launch an O/S which should take over the watchdog. If something
fails, the ROM will attempt to boot to esdhc1, providing a fallback
mechanism of sorts.
While there may be some conditions under which this will be used,
a few dominant use cases and these could be made simpler to understand
and use.
1. Change 'rsmode' to 'rstmode'. I suspect that everyone will have
an easier time understanding that the latter means 'reset mode'.
2. Implement 'download_mode' or 'downusb' as a short-hand for the
sequence:
U-Boot> rsmode usb && reset
This sequence will be executed mostly by those on this list and
the abbreviation is worth the small addition of code.
I already have 'down' in muscle memory and using it will ease
the pain for the (hopefully short) interval while I'm using
both the Freescale 2009.08 code base and mainline.
3. Similarly, implement 'bootsd' or 'bootmmc' with a parameter that
matches the SD card naming used by other U-Boot commands.
How many of you know without grepping or pulling up a schematic
which device corresponds to 'mmc 0'?
It seems more intuitive to issue this command:
U-Boot> bootmmc 0
instead of this:
U-Boot> rsmode esdhc3 && reset
4. Same rationale for 'bootsata'.
5. Allow boards to say which devices are even exposed in their config
headers. i.e.
#define BOARD_HAS_ESDHC3
...
#ifdef BOARD_HAS_ESDHC3
{"esdhc1", mkval(0x40, 0x20, 0x00, 0x12)},
#endif
This will allow a form of self-documentation when running 'rsmode'
with no parameters.
I doubt any board supports all of the boot options.
Let us know your thoughts on this and thanks for the code Troy!
Regards,
Eric
next prev parent reply other threads:[~2012-05-27 17:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-26 21:01 [U-Boot] [PATCH 1/3] common/cmd_rsmode.c: add imx reset mode command Troy Kisky
2012-05-26 21:01 ` [U-Boot] [PATCH 2/3] mx6qsabrelite: select CONFIG_CMD_RSMODE Troy Kisky
2012-05-26 21:01 ` [U-Boot] [PATCH 3/3] mx53evk: " Troy Kisky
2012-05-27 6:04 ` [U-Boot] [PATCH 1/3] common/cmd_rsmode.c: add imx reset mode command Dirk Behme
2012-05-27 17:16 ` Eric Nelson [this message]
2012-05-28 17:36 ` Dirk Behme
2012-05-29 14:25 ` Eric Nelson
2012-06-04 19:52 ` Wolfgang Denk
2012-06-04 20:16 ` Eric Nelson
2012-06-21 20:57 ` Wolfgang Denk
2012-06-22 16:04 ` Eric Nelson
2012-07-11 6:32 ` Dirk Behme
2012-07-11 18:01 ` Troy Kisky
2012-07-11 18:44 ` Dirk Behme
2012-05-27 17:33 ` Eric Nelson
2012-06-04 19:46 ` Wolfgang Denk
2012-06-04 20:43 ` Troy Kisky
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=4FC26173.9060907@boundarydevices.com \
--to=eric.nelson@boundarydevices.com \
--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