[U-Boot] [PATCH] Allow the "reset" command to be omitted with CONFIG_CMD_RESET

Moffett, Kyle D Kyle.D.Moffett at boeing.com
Thu Oct 20 22:10:10 CEST 2011


On Oct 20, 2011, at 15:53, Mike Frysinger wrote:
> On Thursday 20 October 2011 15:05:50 Kyle Moffett wrote:
>> --- a/common/cmd_boot.c
>> +++ b/common/cmd_boot.c
>> @@ -71,8 +71,10 @@ U_BOOT_CMD(
>> 
>> #endif
>> 
>> +#ifdef CONFIG_CMD_RESET
>> U_BOOT_CMD(
>> 	reset, 1, 0,	do_reset,
>> 	"Perform RESET of the CPU",
>> 	""
>> );
>> +#endif
> 
> would be a good time to split this into a dedicated common/cmd_reset.c

Is it really worth a separate file for just 7 lines of code?

The "do_reset" function itself is defined in the architecture-specific
code that implements it (EG: arch/powerpc/cpu/mpc85xx/cpu.c), so there
is nothing else generic about the command.

>> --- a/include/config_cmd_all.h
>> +++ b/include/config_cmd_all.h
>> 
>> --- a/include/config_cmd_defaults.h
>> +++ b/include/config_cmd_defaults.h
> 
> updating these files is not sufficient and will break boards.  drop the hunks to 
> these files and update include/config_defaults.h instead.

Ah, ok.  The README docs weren't very clear about that.  Fixed, thanks!

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