]> git.baikalelectronics.ru Git - arm-tf.git/commit
fdt/wrappers: Generalise fdtw_read_array()
authorAndre Przywara <andre.przywara@arm.com>
Mon, 30 Mar 2020 22:21:13 +0000 (23:21 +0100)
committerAndre Przywara <andre.przywara@arm.com>
Tue, 28 Apr 2020 14:56:31 +0000 (15:56 +0100)
commit6e3a89f449fa5b4c0153990a64124211197f426a
treeacc0b6019bead030186f72bb7ed8250e809a4c4d
parent455a6f3b146353cedc6e97d675168a9b1cdd4f5d
fdt/wrappers: Generalise fdtw_read_array()

Currently our fdtw_read_array() implementation requires the length of
the property to exactly match the requested size, which makes it less
flexible for parsing generic device trees.
Also the name is slightly misleading, since we treat the cells of the
array as 32 bit unsigned integers, performing the endianess conversion.

To fix those issues and align the code more with other DT users (Linux
kernel or U-Boot), rename the function to "fdt_read_uint32_array", and
relax the length check to only check if the property covers at least the
number of cells we request.
This also changes the variable names to be more in-line with other DT
users, and switches to the proper data types.

This makes this function more useful in later patches.

Change-Id: Id86f4f588ffcb5106d4476763ecdfe35a735fa6c
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
common/fdt_wrappers.c
include/common/fdt_wrappers.h
plat/arm/board/fvp/fconf/fconf_hw_config_getter.c
plat/arm/board/fvp/jmptbl.i
plat/arm/board/juno/jmptbl.i
plat/arm/common/fconf/arm_fconf_io.c
plat/arm/common/fconf/arm_fconf_sp.c