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>
1 parent 455a6f3 commit 6e3a89f449fa5b4c0153990a64124211197f426a
@Andre Przywara Andre Przywara authored on 30 Mar 2020
Showing 7 changed files
View
common/fdt_wrappers.c
View
include/common/fdt_wrappers.h
View
plat/arm/board/fvp/fconf/fconf_hw_config_getter.c
View
plat/arm/board/fvp/jmptbl.i
View
plat/arm/board/juno/jmptbl.i
View
plat/arm/common/fconf/arm_fconf_io.c
View
plat/arm/common/fconf/arm_fconf_sp.c