[U-Boot] [PATCH] fdt: call fdt_parent_offset fewer times while translating addresses

Kumar Gala galak at kernel.crashing.org
Tue Aug 31 16:11:40 CEST 2010


On Aug 19, 2010, at 2:02 AM, Kumar Gala wrote:

> From: Scott Wood <scottwood at freescale.com>
> 
> fdt_parent_offset() is an expensive operation, so we'd like to reduce
> unnecessary calls to it.
> 
> Further, the practice of iterating up to the root if address/size cells
> aren't found was apparently done for Linux for compatibility with certain
> buggy Open Firmware implementations, and U-Boot inherited the code.  The
> compliant behavior is to treat a missing #address-cells as 2, and a missing
> #size-cells as 1 -- never looking anywhere but the immediate parent of the
> node of interest.
> 
> Signed-off-by: Scott Wood <scottwood at freescale.com>
> Signed-off-by: Kumar Gala <galak at kernel.crashing.org>
> ---
> 
> It also reduces the size of the u-boot image by 216 bytes.
> 
> common/fdt_support.c |   58 ++++++++++++++++++-------------------------------
> 1 files changed, 21 insertions(+), 37 deletions(-)

applied

- k



More information about the U-Boot mailing list