uboot/lib
Przemyslaw Marczak ff0a6358b6 fdtdec: fix parsing 'reg' property with zero value in '#size-cells'
After rework of lib/fdtdec.c by:

commit: 02464e3 fdt: add new fdt address parsing functions

the function fdtdec_get_addr() doesn't work as previous,
because the implementation assumes that properties '#address-cells'
and '#size-cells' are equal to 1, which can be not true sometimes.

The new API introduced fdtdec_get_addr_size_auto_parent() for the 'reg'
property parsing, but the implementation assumes, that #size-cells
can't be less than 1.

This causes that the following children's 'reg' property can't be reached:

parent@0x0 {
     #address-cells = <1>;
     #size-cells = <0>;
     children@0x100 {
         reg = < 0x100 >;
     };
};

Change the condition value from '1' to '0', which allows parsing property
with at least zero #size-cells, fixes the issue.

Now, fdtdec_get_addr_size_auto_parent() works properly.

Tested on: Odroid U3/X2, Trats, Trats2, Odroid XU3, Snow (by Simon).

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
2015-10-03 14:39:19 +01:00
..
bzip2 bzlib: Update destLen even on error 2015-01-14 11:35:44 -05:00
dhry Add a dhrystone benchmark command 2015-07-21 17:39:19 -06:00
efi efi: Add functions for decoding the EFI tables 2015-08-05 08:44:07 -06:00
libfdt fdt: Add fdt_first/next_region() functions 2015-07-21 17:39:20 -06:00
lzma lzma: fix buffer bound check error further 2015-01-14 11:35:43 -05:00
lzo lzo: Update dst_len even on error 2015-01-14 11:35:44 -05:00
rsa rsa : Compile Modular Exponentiation files based on CONFIG_RSA_SOFTWARE_EXP 2015-03-05 12:04:59 -08:00
tizen
zlib Move malloc_cache_aligned() to its own header 2015-09-11 17:15:16 -04:00
Kconfig tpm: Add Kconfig options for TPMs 2015-08-31 07:57:27 -06:00
Makefile of: clean up OF_CONTROL ifdef conditionals 2015-08-18 13:46:05 -04:00
addr_map.c
aes.c
asm-offsets.c lib/asm-offsets - make GD_RELOCADDR, GD_RELOC_OFF & GD_START_ADDR_SP available for all architectures 2015-03-05 20:50:28 -05:00
bch.c
bitrev.c
circbuf.c
crc7.c
crc8.c
crc16.c
crc32.c
ctype.c
display_options.c lib/display_options: Fix print_freq 2015-08-28 12:32:36 -04:00
div64.c
errno.c
errno_str.c lib: errno: introduce errno_str(): returns errno related message 2014-12-11 13:18:41 -07:00
fdtdec.c fdtdec: fix parsing 'reg' property with zero value in '#size-cells' 2015-10-03 14:39:19 +01:00
fdtdec_common.c
fdtdec_test.c
gunzip.c gunzip: add gzwrite routine for extracting compresed images to block device 2015-04-22 12:14:55 -04:00
gzip.c Move malloc_cache_aligned() to its own header 2015-09-11 17:15:16 -04:00
hang.c
hashtable.c env: import: hashtable: Free memory allocated before exiting from himport_r() 2015-09-15 15:05:13 -04:00
initcall.c efi: Display the correct initcall pre-relocation values 2015-08-05 08:42:41 -06:00
ldiv.c
linux_compat.c linux_compat: handle __GFP_ZERO in kmalloc() 2015-07-22 07:30:44 -06:00
linux_string.c
list_sort.c
lmb.c
md5.c
net_utils.c net: cosmetic: Change IPaddr_t to struct in_addr 2015-04-18 11:11:32 -06:00
physmem.c
qsort.c
rand.c
rbtree.c
rc4.c Add rivest cipher 4 (rc4) implementation 2015-07-21 17:39:28 -06:00
sha1.c
sha256.c
slre.c
string.c lib: string: move strlcpy() to a common place 2014-12-11 13:18:41 -07:00
strmhz.c
time.c
tpm.c tpm: Add functions to access flags and permissions 2015-08-31 07:57:29 -06:00
trace.c common: Make sure arch-specific map_sysmem() is defined 2015-04-18 11:11:09 -06:00
uuid.c
vsprintf.c lib: Add function to extract a number from the end of a string 2015-07-21 17:39:28 -06:00