[U-Boot] [PATCH 2/3] mpc85xx: Add a board-specific restart hook
Moffett, Kyle D
Kyle.D.Moffett at boeing.com
Thu Oct 20 19:45:39 CEST 2011
On Oct 20, 2011, at 10:02, Wolfgang Denk wrote:
> Dear "Moffett, Kyle D",
> In message <8B4AC84D-1F22-4326-B75A-FB3CC39A5CF7 at boeing.com> you wrote:
>>
>> Would you accept a patch which makes it possible for a board to not
>> implement a "reset" command at all?
>>
>> There are a few places in common/cmd_bootm.c which are converted to use
>> panic("...") instead of printf("...")+do_reset().
>
> This is not acceptable, as changes behaviour: panic() will halt the
> system, not reset it.
That is obviously wrong, as a 5 second glance at panic() in the file
lib/vsprintf.c would tell you. For 540 of the 567 board configs in
the include/configs/ directory, panic will directly call do_reset();
only 27 of the configs (less than 5%) set CONFIG_PANIC_HANG.
The only change with the patch for boards without CONFIG_PANIC_HANG is
that panic() has an extra udelay() to ensure that the serial console
messages go out before the reset.
For the boards that *do* set CONFIG_PANIC_HANG, none of the fatal
errors in common/cmd_bootm.c should cause U-Boot to reset, they are
all valid panic() conditions, such as GZIP overwrite errors and fatal
image format issues. In those cases this is also a bugfix.
Patch to follow shortly.
Cheers,
Kyle Moffett
--
Curious about my work on the Debian powerpcspe port?
I'm keeping a blog here: http://pureperl.blogspot.com/
More information about the U-Boot
mailing list