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
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to