[U-Boot] [PATCH] powerpc/85xx: compare actual device addresses with the device tree

Timur Tabi timur at freescale.com
Tue Nov 16 23:16:05 CET 2010


Wolfgang Denk wrote:
> 
>> > If we agree that this is adebug help, then please provide a separate
>> > command to perform this operation. Make this command optional (feel
>> > free to add it to the default list, but it must be possible to disable
>> > it if wanted). Then users who want this feature can add it to their
>> > boot command sequence, and others, who are interested in fast boot
>> > times can omit it.
>>
>> Would "fdt verify" be a good place?
> 
> Yes, sounds good to me.

There is one problem -- a lot of the code is 85xx-specific.  I'm not sure how to
reasonably make this feature available to all fdt-capable architectures.  Would
you be okay with I enclosed it in an #ifdef CONFIG_MPC85xx, like this:

U_BOOT_CMD(
	fdt,	255,	0,	do_fdt,
	"flattened device tree utility commands",
	    "addr   <addr> [<length>]        - Set the fdt location to <addr>\n"
#ifdef CONFIG_OF_BOARD_SETUP
	"fdt boardsetup                      - Do board-specific set up\n"
#endif
	"fdt move   <fdt> <newaddr> <length> - Copy the fdt to <addr> and make it active\n"
...
#ifdef CONFIG_MPC85xx
	"fdt verify                          - Verify the addresses in the device tree\n"
#endif
	"NOTE: Dereference aliases by omiting the leading '/', "
		"e.g. fdt print ethernet0."
);

-- 
Timur Tabi
Linux kernel developer at Freescale



More information about the U-Boot mailing list